Skills - email2jira
-
name: email2jira
description: Convert incoming email requests to Jira tickets for Team China DevSecOps. Use this skill when the user asks to check emails for requests, process DevSecOps requests from email, create Jira tickets from emails, or mentions "email2jira", "email to jira", "request emails", or wants to triage incoming requests sent to Team China DevSecOps. Also trigger when the user mentions checking inbox for team requests or converting email requests to tickets.Email to Jira Ticket Workflow
This skill monitors Outlook emails for requests sent to Team China DevSecOps and creates corresponding Jira tickets in the CDTT project.
When to Use
- User asks to "check emails for requests" or "process email requests"
- User wants to create Jira tickets from incoming emails
- User mentions Team China DevSecOps email requests
- User asks to triage or handle incoming requests
Workflow
Step 1: Search for Request Emails
Search Outlook for emails matching these criteria:
- Subject contains "request" (case-insensitive)
- Recipients (To or CC) include "Team China DevSecOps"
Use the Outlook MCP tools:
outlook_outlook_search_emails with query: "request"Then filter results to only include emails where:
- The
toorccfield contains "Team China DevSecOps" or "devsecops" (the team's email alias) - The email hasn't already been processed (check for existing Jira tickets with the same subject)
Step 2: Read and Understand Each Email
For each matching email:
- Get the full email content using
outlook_outlook_get_email_content - Extract key information:
- Requester: The sender's name and email
- Subject: Email subject line (will become Jira summary)
- Request Details: The email body content
- Date: When the request was received
- Attachments: Note if there are any attachments
Step 3: Get Active Sprint
Before creating tickets, find the current active sprint for the CDTT project:
get_project_sprints with: - project_key: "CDTT" - state: "active"This returns the active sprint(s). Use the first active sprint found for ticket assignment.
Step 4: Create Jira Ticket
For each request email, create a Jira Story with:
Project: CDTT
Issue Type: Story
Assignee: XXX(xxx@ford.com) — assigned viajira_assign_issueafter creation
Epic Link: CDTT-33xx
Sprint: (use the active sprint name from Step 3)Summary Format:
[Email Request] {Original Email Subject}Description Format:
h2. Request Source *From*: {Sender Name} ({Sender Email}) *Received*: {Email Date} *Original Subject*: {Subject} h2. Request Details {Email Body Content} ---- _This ticket was auto-generated from an email request sent to Team China DevSecOps._Use the Jira MCP tool:
jira_create_issue with: - project_key: "CDTT" - issue_type: "Story" - summary: "[Email Request] {subject}" - description: {formatted description} - epic_link: "CDTT-33xx" - sprint_name: "{active_sprint_name}" # from Step 3Step 5: Assign to XXX
After creating the ticket, assign it using the account email (the
assigneeparameter injira_create_issuedoes not work reliably):jira_assign_issue with: - issue_key: "CDTT-XXXX" - assignee_email: "xxx@ford.com"Step 6: Verify and Fix Sprint Assignment
After creating the ticket, the sprint may not be set correctly due to Jira API limitations. Always verify and fix:
move_to_sprint with: - issue_key: "CDTT-XXXX" - sprint_name: "{active_sprint_name}" # from Step 3This ensures the ticket is added to the active sprint.
Step 7: Mark Email as Processed (Optional)
After successfully creating the Jira ticket:
- Flag the email using
outlook_outlook_flag_emailto indicate it's been processed - Optionally reply to the sender confirming the ticket was created (ask user first)
Step 8: Report Results
Provide a summary to the user:
- Number of emails found matching criteria
- Number of Jira tickets created
- Active sprint name used
- List of ticket keys with links
- Any emails that couldn't be processed and why
Example Output
Active Sprint: Devops 202606 Found 3 request emails for Team China DevSecOps: 1. "Request: New Jenkins pipeline for Project X" From: john.doe@ford.com -> Created CDTT-1234, linked to Epic CDTT-3365, added to active sprint 2. "Request: Access to production environment" From: jane.smith@ford.com -> Created CDTT-1235, linked to Epic CDTT-3365, added to active sprint 3. "Request: Help with Docker deployment" From: bob.wilson@ford.com -> Created CDTT-1236, linked to Epic CDTT-3365, added to active sprint All 3 tickets created, assigned to Jian Liu, linked to Epic CDTT-3365, and added to active sprint (Devops 202606).Error Handling
- If Outlook search fails, report the error and suggest checking MCP connectivity
- If no active sprint found, warn the user and create ticket without sprint assignment
- If Jira ticket creation fails, save the email details and report which ones failed
- If sprint assignment fails, report the issue but keep the created ticket
- If an email appears to be a duplicate request (similar subject to existing ticket), flag it and ask user before creating