URL/IP Threat Intelligence Scanner with VirusTotal and Greynoise

URL/IP Threat Intelligence Scanner with VirusTotal and Greynoise

This workflow provides a comprehensive threat intelligence scanning solution that accepts URLs or IP addresses via a webhook or form, enriches them with data from VirusTotal and Greynoise, and delivers detailed reports via Slack and email. It automatically distinguishes between IP addresses and domain names, performs DNS resolution when needed, and handles the asynchronous nature of VirusTotal scans with polling and retry logic.

Workflow Nodes

  1. Form Trigger — Receives submissions via an n8n form (No auth)

    • Presents a web form with fields for URL/IP and email address
    • Users submit URLs or IPs for scanning through a browser interface
  2. Webhook — Receives API submissions via POST request (No auth)

    • Accepts JSON payloads with an array of URLs/IPs and an email address
    • Example payload: {"data": [{"url": "1.1.1.1"}, {"url": "facebook.com"}], "email": "[email protected]"}
  3. Get List of URLs — Item Lists node (No auth)

    • Splits the incoming JSON array into individual items for parallel processing
    • Extracts the body.data field to create separate workflow items
  4. Set Email — Set node (No auth)

    • Captures the email address from the webhook payload and attaches it to each URL item
    • Ensures the email is available for the reporting stage
  5. Is IP? — IF node (No auth)

    • Checks if the input is an IP address using regex pattern matching
    • Routes to IP processing (true) or DNS lookup (false) branches
  6. Set IP — Set node (No auth)

    • For IP addresses, directly assigns the IP value to the workflow data
    • Prepares the IP for downstream processing
  7. DNS Lookup — HTTP Request node (No auth)

    • Queries Google DNS (dns.google/resolve) to resolve domain names to IP addresses
    • Extracts the domain from URLs and performs DNS resolution
  8. Set IP From Lookup — Code node (No auth)

    • Extracts the resolved IP address from the DNS response
    • Updates the workflow item with the resolved IP
  9. Merge — Merge node (No auth)

    • Combines IP data from both branches (direct IP and DNS-resolved IP)
    • Creates unified items for further processing
  10. Start VirusTotal Scan — HTTP Request node (VirusTotal API Key auth)

    • Submits URLs to VirusTotal for scanning via POST request
    • Uses multipart form data to send the URL for analysis
  11. Wait 5s — Wait node (No auth)

    • Pauses execution for 5 seconds to allow VirusTotal to process the scan
    • Prevents rapid polling that could hit rate limits
  12. VirusTotal result — HTTP Request node (VirusTotal API Key auth)

    • Fetches scan results from VirusTotal using the self-link from the submission response
    • Retrieves the current status and results of the scan
  13. Filter — Filter node (No auth)

    • Checks if the VirusTotal scan status is not "completed"
    • Routes incomplete scans back for another polling cycle
  14. VirusTotal ready? — IF node (No auth)

    • Checks if the scan status is no longer "queued"
    • Routes completed scans to results processing, queued scans back to waiting
  15. Combine looped items — Code node (No auth)

    • Aggregates all completed VirusTotal results from the polling loop
    • Collects results until all scans are complete
  16. VirusTotal Summary — Set node (No auth)

    • Extracts and structures VirusTotal scan statistics (harmless, malicious, suspicious, undetected, timeout)
    • Captures BlockList and OpenPhish results
    • Preserves the original URL and IP for reporting
  17. GreyNoise RIOT lookup — HTTP Request node (Header Auth with Greynoise API key)

    • Queries Greynoise RIOT API to check if the IP is part of common internet noise
    • Helps identify benign or trusted IP addresses
  18. GreyNoise IP Check — HTTP Request node (Header Auth with Greynoise API key)

    • Queries Greynoise Context API for detailed IP threat intelligence
    • Returns classification, trust level, location, tags, and category
  19. Merge Greynoise results — Merge node (No auth)

    • Combines RIOT and Context results from both Greynoise API calls
    • Creates a unified Greynoise dataset per IP
  20. Greynoise Summary — Set node (No auth)

    • Structures Greynoise data for reporting (classification, location, tags, category, trust level)
    • Cleans and formats the data for downstream use
  21. Merge VirusTotal & Greynoise results — Merge node (No auth)

    • Combines VirusTotal and Greynoise results using the IP field as the matching key
    • Creates comprehensive threat intelligence records
  22. Send Report Slack — Slack node (OAuth2 with Slack)

    • Posts formatted threat intelligence reports to a Slack channel
    • Includes VirusTotal stats, BlockList/OpenPhish results, and Greynoise data
    • Shows a summary indicator (✅ Harmless or 🚨 Malicious)
  23. Send Report Email — Gmail node (OAuth2 with Google)

    • Sends HTML-formatted threat intelligence reports via email
    • Uses the email address provided in the original submission
    • Includes all scan results in a readable HTML format

Setup Instructions

Required Accounts and Credentials

  1. VirusTotal API Key — Sign up at VirusTotal and get a free API key (500 requests/day, 4 req/min limit). Create an n8n credential of type "VirusTotal API".

  2. Greynoise Enterprise API Key — Subscribe to Greynoise enterprise plan. Create an n8n credential of type "Header Auth" with the API key as the header value.

  3. Slack Workspace — Create a Slack app with chat:write permissions and install it to your workspace. Create an n8n OAuth2 credential for Slack.

  4. Gmail/Google Account — Enable Gmail API in Google Cloud Console and create OAuth2 credentials. Create an n8n OAuth2 credential for Google.

Configuration Steps

  1. Import the workflow into your n8n instance
  2. Configure all credential nodes with your API keys
  3. Update the Slack channel ID in the "Send Report Slack" node to your desired channel
  4. Test the workflow using the form or webhook endpoint

Use Cases and Variations

Primary Use Cases

  • Security Operations: Automate threat intelligence gathering for SOC teams
  • Phishing Investigation: Quickly scan suspicious URLs reported by employees
  • Threat Hunting: Batch process IP addresses and domains for threat analysis
  • Compliance Reporting: Generate automated security scan reports

Adaptation Ideas

  • Add Database Storage: Store scan results in a database for historical analysis
  • Integrate Additional Threat Feeds: Add nodes for AlienVault OTX, Shodan, or AbuseIPDB
  • Create Alerting Rules: Add conditional logic to trigger alerts only for malicious results
  • Build a Dashboard: Send results to a Google Sheet or Airtable for visualization
  • Add Rate Limiting: Implement queue management for high-volume submissions
  • Customize Report Format: Modify the Slack and email templates for your team's needs
29 nodeswebhook triggersecurity
HTTP RequestCodeSetMergeIFWaitWebhookItem Lists

Workflow JSON

{
  "meta": {
    "instanceId": "8c8c5237b8e37b006a7adce87f4369350c58e41f3ca9de16196d3197f69eabcd",
    "templateId": "1971"
  },
  "nodes": [
    {
      "id": "dbb98f7d-6737-4eaa-9a66-9779c042c575",
      "name": "VirusTotal result",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2430,
        1648
      ],
      "parameters": {
        "url": "={{ $json.data.links.self }}",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "virusTotalApi"
      },
      "typeVersion": 4.1
    },
    {
      "id": "fb71337b-ebd3-4331-9f18-ff953c6b068b",
      "name": "DNS Lookup",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1330,
        1028
      ],
      "parameters": {
        "url": "=https://dns.google/resolve",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "name",
              "value": "={{ $json.url.includes('://') ? $json.url.split('://')[1].split('/')[0] : $json.url }}"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "290c6e9c-31d1-4476-9beb-b72a795ecfbb",
      "name": "Set IP From Lookup",
      "type": "n8n-nodes-base.code",
      "position": [
// ... truncated (copy to see full JSON)

How to Import This Workflow

  1. 1Copy the workflow JSON above using the Copy Workflow JSON button.
  2. 2Open your n8n instance and go to Workflows.
  3. 3Click Import from JSON and paste the copied workflow.

Don't have an n8n instance? Start your free trial at n8nautomation.cloud

Ready to automate with n8n?

Get affordable managed n8n hosting with 24/7 support.