Skip to main content

Analyze & sort suspicious email contents with ChatGPT

Workflow preview

Workflow preview
100%
Analyze & sort suspicious email contents with ChatGPT preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Analyze & Sort Suspicious Email Contents with ChatGPT and Jira Who is this for? This workflow is tailored for IT security teams, managed service providers (MSPs), and organizations aiming to stream...

Best for

  • SecOps automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.gmailtrigger, n8n-nodes-base.microsoftoutlooktrigger, n8n-nodes-base.httprequest, n8n-nodes-base.set, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.jira, n8n-nodes-base.converttofile

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Angel Menendez.

Original n8n.io source

1.1 Workflow description

Title
Analyze & sort suspicious email contents with ChatGPT
Workflow name
Analyze & sort suspicious email contents with ChatGPT

Analyze & Sort Suspicious Email Contents with ChatGPT and Jira

Who is this for?

This workflow is tailored for IT security teams, managed service providers (MSPs), and organizations aiming to streamline the detection and reporting of phishing emails. It's especially useful for teams handling high email volumes and requiring quick, automated analysis.

What problem is this workflow solving?

Phishing emails pose a significant cybersecurity threat, and manual review processes are time-consuming and prone to human error. This workflow automates the identification of malicious emails, provides AI-driven insights, and generates structured reports, enabling faster and more efficient responses to email-based threats.

What this workflow does

This workflow integrates Gmail or Microsoft Outlook to monitor and capture incoming emails. It processes the email content and headers, converts the email's body to a visual screenshot for clarity, and uses ChatGPT's advanced AI to analyze the email for phishing indicators. Based on the analysis, it categorizes emails as potentially malicious or benign, creating detailed Jira tickets for each case. Attachments, including the email body and screenshots, are automatically uploaded for comprehensive reporting.

Key steps include:

  1. Email Integration: Captures emails from Gmail or Microsoft Outlook.
  2. Content Processing: Extracts and organizes email content and metadata.
  3. AI Analysis: Uses ChatGPT to evaluate email content and headers.
  4. Classification: Categorizes emails as malicious or benign.
  5. Automated Reporting: Creates Jira tickets with detailed analysis and attachments.
Setup
  1. Authentication: Configure Gmail or Microsoft Outlook credentials in n8n.
  2. API Keys: Add credentials for the HTML screenshot service (hcti.io) and OpenAI.
  3. Jira Configuration: Set up project and issue types in the Jira nodes.
  4. Customization: Update sticky notes and nodes to fit your organizational requirements, such as modifying the AI prompt or Jira ticket fields.
How to customize this workflow to your needs
  • Adjust email triggers to include or exclude specific senders or subjects.
  • Refine the AI prompt in the ChatGPT node to tailor phishing detection criteria.
  • Modify Jira ticket content to include additional fields or match specific workflows.

This workflow is ideal for automating email threat detection, reducing response times, and enhancing overall cybersecurity processes. By leveraging AI-powered insights, it helps organizations stay ahead of phishing attacks.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Gmail Trigger

Type / Role
n8n-nodes-base.gmailTrigger - gmailTrigger
Config choices
Version 1.2

Block 2 - Microsoft Outlook Trigger

Type / Role
n8n-nodes-base.microsoftOutlookTrigger - microsoftOutlookTrigger
Config choices
Version 1

Block 3 - Screenshot HTML

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 4 - Retrieve Screenshot

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 5 - Set Outlook Variables

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 6 - Set Gmail Variables

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 7 - Retrieve Headers of Email

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 8 - Format Headers

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - Analyze Email with ChatGPT

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.6

Block 10 - Create Potentially Malicious Ticket

Type / Role
n8n-nodes-base.jira - jira
Config choices
Version 1

Block 11 - Create Potentially Benign Ticket

Type / Role
n8n-nodes-base.jira - jira
Config choices
Version 1

Block 12 - Rename Screenshot

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - Set Jira ID

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 14 - Upload Screenshot of Email to Jira

Type / Role
n8n-nodes-base.jira - jira
Config choices
Version 1

Block 15 - Upload Email Body to Jira

Type / Role
n8n-nodes-base.jira - jira
Config choices
Version 1

Block 16 - Convert Email Body to File

Type / Role
n8n-nodes-base.convertToFile - convertToFile
Config choices
Version 1.1

Block 17 - Set Email Variables

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 18 - Rename Email Body Screenshot

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 19 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Check if Malicious

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Showing the first 24 of 25 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Analyze & sort suspicious email contents with ChatGPT
Complexity advanced
Nodes 25
Categories SecOps, AI Summarization
Author Angel Menendez
Published 21 Dec 2024

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2666/2666.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Analyze & sort suspicious email contents with ChatGPT do?

Analyze & Sort Suspicious Email Contents with ChatGPT and Jira Who is this for? This workflow is tailored for IT security teams, managed service providers (MSPs), and organizations aiming to stream...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your SecOps, AI Summarization use case.