← All N8N workflows
AI & researchCodeGmail TriggerHTTP RequestJiraMicrosoft Outlook Trigger

Gmail Integration and Data Extraction

Configured with Gmail Trigger, HTTP Request, Jira, Microsoft Outlook Trigger, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
TriggerGmail TriggerGmail TriggerTriggerMicrosoft OutlookTriggerMicrosoft Outlook TriggerWeb / APIScreenshot HTMLHTTP RequestWeb / APIRetrieve ScreenshotHTTP RequestTransformSet Outlook VariablesEdit FieldsTransformSet Gmail VariablesEdit FieldsWeb / APIRetrieve Headers ofEmailHTTP RequestCodeFormat HeadersCodeTransformSet Email VariablesEdit FieldsAI & modelsChatGPT AnalysisOpen AiIntegrationCreate Jira TicketJiraCodeRename ScreenshotCodeIntegrationUpload Screenshot ofEmail to JiraJira

Node categories in this workflow

  • Trigger
  • Web / API
  • Transform
  • Code
  • AI & models
  • Integration

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
Gmail TriggerTriggerGmail TriggerSee node parameters
Microsoft Outlook TriggerTriggerMicrosoft Outlook TriggerSee node parameters
Screenshot HTMLWeb / APIHTTP RequestPOST
Retrieve ScreenshotWeb / APIHTTP RequestSee node parameters
Set Outlook VariablesTransformEdit FieldsSee node parameters
Set Gmail VariablesTransformEdit FieldsSee node parameters
Retrieve Headers of EmailWeb / APIHTTP RequestSee node parameters
Format HeadersCodeCodeSee node parameters
Set Email VariablesTransformEdit FieldsSee node parameters
ChatGPT AnalysisAI & modelsOpen Aiimage / analyze
Create Jira TicketIntegrationJiraSee node parameters
Rename ScreenshotCodeCodeSee node parameters
Upload Screenshot of Email to JiraIntegrationJiraissueAttachment

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • gmailOAuth2
  • httpBasicAuth
  • jiraSoftwareCloudApi
  • microsoftOutlookOAuth2Api
  • openAiApi

Workflow notes

Gmail Integration and Data Extraction

Gmail Integration and Data Extraction

This section of the workflow connects to a Gmail account using the Gmail Trigger node, capturing incoming emails in real-time, with checks performed every minute. Once an email is detected, its key components—such as the subject, recipient, body, and headers—are extracted and assigned to variables using the Set Gmail Variables node. These variables are structured for subsequent analysis and processing in later steps.

Microsoft Outlook Integration and Email Header Processing

Microsoft Outlook Integration and Email Header Processing

This section connects to a Microsoft Outlook account to monitor incoming emails using the Microsoft Outlook Trigger node, which checks for new messages every minute. Emails are then processed to retrieve detailed headers and body content via the Retrieve Headers of Email node. The headers are structured into a user-friendly format using the Format Headers code node, ensuring clarity for further analysis. Key details, including the email's subject, recipient, and body content, are assigned to variables with the Set Outlook Variables node for streamlined integration into subsequent workflow steps.

HTML Screenshot Generation and Email Visualization

HTML Screenshot Generation and Email Visualization

This section processes an email’s HTML content to create a visual representation, useful for documentation or phishing detection workflows. The Set Email Variables node organizes the email's HTML body into a format ready for processing. The Screenshot HTML node sends this HTML content to the hcti.io API, which generates a screenshot of the email's layout. The Retrieve Screenshot node then fetches the image URL for further use in the workflow. This setup ensures that the email's appearance is preserved in a visually accessible format, simplifying review and reporting. Keep in mind however that this exposes the email content to a third party. If you self host n8n, you can deploy a cli tool to rasterize locally instead.

AI-Powered Email Analysis with ChatGPT

AI-Powered Email Analysis with ChatGPT

This section leverages AI to analyze email content and headers for phishing indicators. The ChatGPT Analysis node utilizes the ChatGPT-4 model to review the email screenshot and associated metadata, including message headers. It generates a detailed report indicating whether the email might be a phishing attempt. The output is formatted specifically for Jira’s wiki-style renderer, making it ready for seamless integration into ticketing workflows. This ensures thorough and automated email threat assessments.

Automated Jira Ticket Creation for Phishing Reports

Automated Jira Ticket Creation for Phishing Reports

This section streamlines the process of reporting phishing emails by automatically creating detailed Jira tickets. The Create Jira Ticket node compiles email information, including the subject, recipient, body text, and ChatGPT's phishing analysis, into a structured ticket. The Rename Screenshot node ensures that the email screenshot file is appropriately labeled for attachment. Finally, the Upload Screenshot of Email to Jira node attaches the email’s visual representation to the ticket, providing additional context for the security team. This integration ensures that phishing reports are logged with all necessary details, enabling efficient tracking and resolution.

Gmail Integration and Data Extraction

Gmail Integration and Data Extraction

Purpose and structure

This folder contains the Gmail Integration and Data Extraction workflow. Its executable nodes use code, gmailTrigger, httpRequest, jira, microsoftOutlookTrigger, openAi, set. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

Gmail Trigger, Microsoft Outlook Trigger

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Code/1308_Code_Microsoftoutlook_Send_Webhook.json MIT; preserve source notices.

More in AI & research