๐Ÿ”’ Scan URLs for security threats with urlscan.io and GPT-4o mini

โšก 1,228 views ยท ๐Ÿ”’ SecOps & Security Automation

Description

How it works

โ€ข Webhook โ†’ urlscan.io โ†’ GPT-4o mini โ†’ Gmail
โ€ข Payload example: { "url": "https://example.com" }
โ€ข urlscan.io returns a Scan ID and raw JSON.
โ€ข AI node classifies the scan as malicious / suspicious / benign, assigns a 1-10 risk score, and writes a two-sentence summary.
โ€ข Gmail sends an alert that includes the URL, Scan ID, AI verdict, screenshot link, and full report link.


Set-up steps (~5 min)

โ€ข Create three credentials in n8n

  1. urlscan.io API key
  2. OpenAI API key (GPT-4o mini access)
  3. Gmail OAuth (or SMTP)
    โ€ข Replace those fields in the nodes, or reference env vars like {{ $env.OPENAI_API_KEY }}.
    โ€ข Switch the Webhook to Production โ†’ copy the live URL.
    โ€ข Test with:
curl -X POST <your-webhook-url> \
     -H "Content-Type: application/json" \
     -d '{ "url": "https://example.com" }'

## ๐Ÿ”— Nodes Used

Webhook, Gmail, urlscan.io, OpenAI

## ๐Ÿ“ฅ Import

Download [`workflow.json`](workflow.json) and import into n8n:
**Workflow menu โ†’ Import from File**

[๐Ÿ“– Importing guide](../../../docs/importing-templates.md) ยท [๐Ÿ”‘ Credential setup](../../../docs/credential-setup.md)