Skip to main content

Analyze email headers for IPs and spoofing

Workflow preview

Workflow preview
100%
Analyze email headers for IPs and spoofing preview
Open on n8n.io

Important notice

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

1. Workflow Overview

This n8n workflow is designed to analyze email headers received via a webhook. The workflow splits into two main paths based on the presence of the received and authentication results headers. In t...

Best for

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

Tools used

n8n-nodes-base.webhook, n8n-nodes-base.stickynote, n8n-nodes-base.code, n8n-nodes-base.respondtowebhook, n8n-nodes-base.itemlists, n8n-nodes-base.httprequest, n8n-nodes-base.set, n8n-nodes-base.switch

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Analyze email headers for IPs and spoofing
Workflow name
Analyze email headers for IPs and spoofing

This n8n workflow is designed to analyze email headers received via a webhook. The workflow splits into two main paths based on the presence of the received and authentication results headers.

In the first path, if received headers are present, the workflow extracts IP addresses from these headers and then queries the IP Quality Score API to gather information about the IP addresses, including fraud score, abuse history, organization, and more. Geolocation data is also obtained from the IP-API API. The workflow collects and aggregates this information for each IP address.

In the second path, if authentication-results headers are present, the workflow extracts SPF, DKIM, and DMARC authentication results. It then evaluates these results and sets fields accordingly (e.g., SPF pass/fail/neutral).

The paths merge their results, and the workflow responds to the original webhook with the aggregated analysis, including IP information and authentication results.

Potential issues during setup include ensuring proper configuration of the webhook calls with header authentication, handling authentication and API keys for the IP Quality Score API, and addressing any discrepancies or errors in the logic nodes, such as handling SPF, DKIM, and DMARC results correctly. Additionally, thorough testing with various email header formats is essential to ensure accurate analysis and response.

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 - Receive Headers

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

Block 2 - Sticky Note

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

Block 3 - Fraud Score

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

Block 4 - Respond to Webhook

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

Block 5 - Sticky Note1

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

Block 6 - Explode Email Header

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

Block 7 - Split Out IPs

Type / Role
n8n-nodes-base.itemLists - itemLists
Config choices
Version 3

Block 8 - Extract IPs from "received"

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

Block 9 - IP Quality Score

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

Block 10 - IP-API

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

Block 11 - Collect interesting data

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

Block 12 - SPF/DKIM/DMARC from "authentication-results"

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

Block 13 - SPF from "received-spf"

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

Block 14 - DKIM from "dkim-signature"

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

Block 15 - DMARC from "received-dmarc"

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

Block 16 - DKIM

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

Block 17 - Sticky Note4

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

Block 18 - Extract Email Header from webhook

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

Block 19 - Sticky Note5

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

Block 20 - Sticky Note6

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

Block 21 - Sticky Note8

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

Block 22 - Sticky Note10

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

Block 23 - Received Headers Present?

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

Block 24 - Authentication Results Present?

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

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

3. Summary Table

Workflow Analyze email headers for IPs and spoofing
Complexity advanced
Nodes 35
Categories SecOps
Author n8n Team
Published 27 Nov 2023

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/1991/1991.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 email headers for IPs and spoofing do?

This n8n workflow is designed to analyze email headers received via a webhook. The workflow splits into two main paths based on the presence of the received and authentication results headers. In t...

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 use case.