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.
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.
| Node | Category | Type | Operation |
|---|---|---|---|
| Gmail Trigger | Trigger | Gmail Trigger | See node parameters |
| Microsoft Outlook Trigger | Trigger | Microsoft Outlook Trigger | See node parameters |
| Screenshot HTML | Web / API | HTTP Request | POST |
| Retrieve Screenshot | Web / API | HTTP Request | See node parameters |
| Set Outlook Variables | Transform | Edit Fields | See node parameters |
| Set Gmail Variables | Transform | Edit Fields | See node parameters |
| Retrieve Headers of Email | Web / API | HTTP Request | See node parameters |
| Format Headers | Code | Code | See node parameters |
| Set Email Variables | Transform | Edit Fields | See node parameters |
| ChatGPT Analysis | AI & models | Open Ai | image / analyze |
| Create Jira Ticket | Integration | Jira | See node parameters |
| Rename Screenshot | Code | Code | See node parameters |
| Upload Screenshot of Email to Jira | Integration | Jira | issueAttachment |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- 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
gmailOAuth2httpBasicAuthjiraSoftwareCloudApimicrosoftOutlookOAuth2ApiopenAiApi
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.