n8n

How to Automate Gmail Outlook Phishing Ticketing?

Stop wasting time sorting suspicious emails by hand. This setup captures emails from Gmail and Outlook, checks them for phishing signs with AI, and opens a detailed ticket in Jira for your security team. It is designed for IT and security teams that need fast, clear reports with all evidence in one place.

Incoming emails are picked up every minute from both inboxes. The flow saves key fields, pulls full headers from Microsoft Graph, and formats them for review. The HTML body is turned into a clean screenshot using an image service, then that image and the headers go to an AI model for analysis. The result, along with the subject, recipients, and body preview, is sent to Jira as a new issue, and the screenshot is attached automatically. You get a consistent record for each report, ready for triage.

You will need accounts and credentials for Gmail, Microsoft Outlook, Jira Software Cloud, OpenAI, and the HTML CSS to Image service. Expect faster triage and fewer mistakes, often cutting review time from 15 minutes to about 2 minutes per email. Great for security teams, IT help desks, and managed service providers that handle many phishing reports across different mail systems.

What are the key features?

  • Dual inbox monitoring with Gmail Trigger and Microsoft Outlook Trigger checks every minute
  • Header retrieval from Microsoft Graph for full internet message headers and text body
  • Header formatting using a code step to group repeated values for clear reading
  • Variable mapping for subject, recipients, HTML body, and previews to keep data organized
  • HTML to image conversion via HTML CSS to Image to preserve the email look
  • Screenshot fetch step to download the image URL for use later in the flow
  • AI review with ChatGPT 4o to flag phishing signals using both the image and headers
  • Automatic Jira issue creation with a structured summary and AI analysis in wiki format
  • Attachment handling that renames and uploads the screenshot to the Jira ticket

What are the benefits?

  • Reduce manual review time from 15 minutes to about 2 minutes per email
  • Streamline phishing intake by up to 80 percent with one standard flow
  • Improve evidence quality by capturing headers and a clean email screenshot
  • Handle up to 5 times more reports with the same team size
  • Connect Gmail, Microsoft Outlook, OpenAI, and Jira in one place

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. In the n8n credentials manager, create Gmail OAuth2 credentials. Double click the Gmail Trigger node, choose Create new credential, and follow the on screen steps to connect your Google account.
  4. In the n8n credentials manager, create Microsoft Outlook OAuth2 credentials. Double click the Microsoft Outlook Trigger and the Retrieve Headers of Email nodes, choose Create new credential, and complete the sign in with the correct permissions.
  5. Create HTML CSS to Image Basic Auth credentials. Double click the Screenshot HTML and Retrieve Screenshot nodes, select Create new credential, and enter your hcti username and API key from your account dashboard.
  6. Create an OpenAI API Key credential. Double click the ChatGPT Analysis node, select Create new credential, and paste your API key from the OpenAI account API keys page.
  7. Create Jira Software Cloud credentials. Double click the Create Jira Ticket and Upload Screenshot of Email to Jira nodes, select Create new credential, and connect using your site URL and API token or OAuth as guided.
  8. Configure node fields: ensure both triggers are set to check every minute. In Retrieve Headers of Email, keep Accept and Prefer headers as provided. In Set nodes, confirm htmlBody, subject, toRecipients, headers, and previews are mapped.
  9. Open the ChatGPT Analysis node and confirm the model is ChatGPT 4o and input type is image base64. Keep max tokens at 1500 or adjust for your needs.
  10. Open the Create Jira Ticket node and set the project key, issue type, and summary format. Make sure the description includes the AI output and header details.
  11. Enable the workflow and send a test email to your Gmail inbox with clear HTML content. Check that a screenshot is generated and an issue appears in Jira with the attachment.
  12. Send a test email to your Outlook inbox. Confirm headers are retrieved, formatted, and included in the Jira ticket, and that the AI summary is present.
  13. If the screenshot is missing, verify your HTML CSS to Image credentials and that the html body variable is not empty. If headers are missing, recheck Outlook permissions and the Prefer header value.

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.