Email Body Screenshot Creation
Configured with Convert To File, Gmail Trigger, HTTP Request, Jira, 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
- Routing
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 |
| Analyze Email with ChatGPT | AI & models | Open Ai | See node parameters |
| Create Potentially Malicious Ticket | Integration | Jira | See node parameters |
| Create Potentially Benign Ticket | Integration | Jira | See node parameters |
| Rename Screenshot | Code | Code | See node parameters |
| Set Jira ID | Transform | Edit Fields | See node parameters |
| Upload Screenshot of Email to Jira | Integration | Jira | issueAttachment |
| Upload Email Body to Jira | Integration | Jira | issueAttachment |
| Convert Email Body to File | Transform | Convert To File | toText |
| Set Email Variables | Transform | Edit Fields | See node parameters |
| Rename Email Body Screenshot | Code | Code | See node parameters |
| Check if Malicious | Routing | If | See node parameters |
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
Email Body Screenshot Creation
Email Body Screenshot Creation
The Screenshot HTML node sends the email's HTML body to the hcti.io API, generating a screenshot that visually represents the email's layout. The Retrieve Screenshot node then fetches this image, making it available for attachment or review in subsequent steps. This dual-format processing ensures both clarity and flexibility in email analysis workflows.
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 enables the integration of Microsoft Outlook to monitor and capture incoming emails. The Microsoft Outlook Trigger node checks for new messages every minute. Once an email is detected, the Retrieve Headers of Email node fetches detailed header and body content via the Microsoft Graph API. The Format Headers node organizes the email headers into a structured format using a JavaScript function, ensuring clarity and readiness for further processing. Finally, the Set Outlook Variables node extracts and assigns key details—such as the email subject, recipient, body, and formatted headers—to variables for use in subsequent workflow steps. This section is essential for processing Outlook emails and preparing them for analysis and reporting.
AI-Powered Email Analysis and Threat Detection
AI-Powered Email Analysis and Threat Detection
This section leverages ChatGPT for advanced email content and header analysis to determine potential phishing threats. The Analyze Email with ChatGPT node processes the email's HTML body and headers, generating a detailed JSON response that categorizes the email as malicious or benign. The response includes a verbose explanation, formatted for Jira, outlining the reasons for the classification. The Check if Malicious node evaluates the AI output to determine the next steps based on the email's threat status. If flagged as malicious, subsequent actions like reporting and ticket creation are triggered. This section ensures precise, AI-driven analysis to enhance email security workflows.
Automated Jira Ticket Creation and Email Attachment
Automated Jira Ticket Creation and Email Attachment
This section streamlines the process of logging phishing email reports in Jira, complete with detailed analysis and attachments. The workflow creates two distinct Jira tickets depending on the AI classification of the email:
- Potentially Malicious: The Create Potentially Malicious Ticket node generates a ticket if the email is flagged as a phishing attempt, including a summary of ChatGPT's analysis and the email’s details.
- Potentially Benign: If the email is classified as safe, the Create Potentially Benign Ticket node logs a ticket with similar details but under a non-malicious category.
The Set Jira ID node ensures the generated ticket's ID is tracked for subsequent operations. Attachments are handled efficiently:
- Rename Screenshot prepares the email screenshot for upload.
- Upload Screenshot of Email to Jira adds the screenshot to the Jira ticket for visual context.
- Rename Email Body Screenshot and Upload Email Body to Jira manage the attachment of the email's text body as a
.txtfile.
This section enhances reporting by automating ticket creation, ensuring all relevant email data is readily available for review by security teams.
Email Body Conversion
Email Body Conversion
This section processes the email body into both text and visual formats for detailed analysis and reporting. The Set Email Variables node organizes the email's data, including its HTML body and text content, to prepare it for further steps. The Convert Email Body to File node creates a .txt file containing the plain text version of the email body, useful for documentation or further analysis.
Email Body Screenshot Creation
Email Body Screenshot Creation
Purpose and structure
This folder contains the Email Body Screenshot Creation workflow. Its executable nodes use code, convertToFile, gmailTrigger, httpRequest, if, 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/1307_Code_Converttofile_Send_Webhook.json MIT; preserve source notices.