n8n

How to Automate Email Phishing Tickets in Jira?

Protect your inbox and speed up phishing review with an email triage flow that watches Gmail and Outlook, uses AI to judge risk, and opens Jira tickets with proof. It fits IT and security teams that need fast, consistent handling of suspicious messages.

New emails arrive through two triggers that check Gmail and Outlook every minute. Outlook headers are pulled from Microsoft Graph, then a code step formats them for clear reading. The email body is turned into a text file and also rendered as an image using an HTML to image service. Both the HTML body and the headers go to OpenAI for analysis. A decision step routes results into two Jira paths. Malicious and benign reports are logged as separate issue types, and the workflow uploads the screenshot and the body file to the ticket. The Jira issue ID is tracked to keep all uploads linked.

Setup needs accounts for Gmail, Microsoft Outlook, Jira, OpenAI, and the HTML to image service. Expect review time per email to drop from many minutes to just a few, with cleaner evidence for your records. Use it for a phishing mailbox, for employee reports, or for a managed service team that supports multiple domains.

What are the key features?

  • Real time email capture from Gmail and Microsoft Outlook every minute
  • Retrieves and formats Outlook internet message headers for clear analysis
  • Builds a plain text file of the email body for easy reading and search
  • Creates a visual screenshot of the HTML email using an HTML to image service
  • Uses OpenAI to analyze HTML and headers for phishing risk with JSON output
  • Routes results into malicious or benign paths using a decision step
  • Creates Jira issues in the right project and issue type with rich descriptions
  • Uploads both the screenshot and the text body file to the Jira ticket and tracks the issue ID

What are the benefits?

  • Reduce manual review from 15 minutes to 2 minutes per email
  • Automate up to 80 percent of phishing triage steps
  • Improve evidence quality by attaching clear text and images
  • Connect Gmail and Outlook to Jira in one flow
  • Handle up to 10 times more reports without extra staff

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Gmail, Microsoft Outlook, Jira Software Cloud, OpenAI and HTML/CSS to Image. See the Tools Required section above for links to create accounts with these services.
  3. Open the Gmail Trigger node, choose Credential to connect with, click Create new credential, and follow the on screen steps to sign in with Gmail OAuth2.
  4. Open the Microsoft Outlook Trigger node, choose Credential to connect with, click Create new credential, and complete the Outlook OAuth2 sign in. Ensure your account has permission to read messages.
  5. Open the Analyze Email with ChatGPT node, create a new OpenAI credential, and paste your API key from your OpenAI account API page. Name the credential clearly.
  6. Open the Jira ticket nodes, create a new Jira Software Cloud credential, and enter your site domain, email, and API token from your Atlassian account. Test the connection.
  7. Open the Screenshot HTML and Retrieve Screenshot nodes. Create a new Basic Auth credential for HTML/CSS to Image using your hcti.io username and API key from the dashboard.
  8. In the Gmail Trigger and Outlook Trigger nodes, keep polling every minute or adjust to your needs. Optionally add filters to limit messages you want to scan.
  9. Confirm the Retrieve Headers step returns internet message headers. If empty, check Outlook permissions and that the Prefer header is set to text.
  10. In the Jira nodes, pick the correct project and issue type. Update summary and description fields if your team needs different wording.
  11. Review the prompt in the Analyze Email with ChatGPT node. Adjust risk rules or output fields if your team uses a specific format.
  12. Send a test email to Gmail and another to Outlook. Run the workflow and check that the screenshot, text file, and Jira issue are created. Confirm the branch matches the AI decision.
  13. If the screenshot step fails, verify the HTML body variable and your HTML/CSS to Image credentials. If Jira uploads fail, check project permissions and attachment size limits. If AI calls fail, confirm your OpenAI key and model settings.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Gmail

Sign up

No cost: Personal Gmail (Gmail API has no usage-based pricing; quotas apply)

HTML/CSS to Image

Sign up

Free plan: $0 / mo, 50 images / mo

Jira Software Cloud

Sign up

Free plan: $0 / mo (up to 10 users); REST API access via API token available on Free and paid plans

Microsoft Outlook

Sign up

Exchange Online (Plan 1): $4.00 user / mo (annual billing)

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.