{
  "name": "Automate external attack surface mapping with Shodan API and DNS lookups",
  "nodes": [
    {
      "id": "ad387c1d-3c0c-419b-a148-35a9451eac27",
      "name": "START – Set target domain",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        160
      ],
      "parameters": {
        "width": 544,
        "height": 112,
        "content": "## Set Target Domain\n**Set the domain you want to recon.**\nBe sure to set the value to https:\\\\**your_ target_website_here.com** and leave the name as *target_domain*"
      }
    },
    {
      "id": "83593886-7ada-462e-85b3-2c3898072938",
      "name": "When clicking 'Test workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1456,
        288
      ]
    },
    {
      "id": "2046d75f-42ba-4e1a-b65d-597b4103a8fa",
      "name": "Set Target Domain1",
      "type": "n8n-nodes-base.set",
      "position": [
        -1232,
        288
      ]
    },
    {
      "id": "c50b017f-6c6f-43bc-bad7-b0ff85b5770a",
      "name": "DNS lookup (Google)",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1088,
        448
      ],
      "parameters": {
        "width": null,
        "height": 96,
        "content": "## DNS Lookup\n**Pull all DNS records for the domain (A, AAAA, CNAME, …)**"
      }
    },
    {
      "id": "27f3dc34-258f-4997-a26b-bd7ec96595fb",
      "name": "DNS Lookup (Google)1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1008,
        288
      ]
    },
    {
      "id": "6e38980b-180f-4660-9d72-5a5cc51b17ea",
      "name": "Extract DNS Records1",
      "type": "n8n-nodes-base.code",
      "position": [
        -784,
        288
      ]
    },
    {
      "id": "7492da78-53da-41c2-85f0-1146dae2d884",
      "name": "Filter only IP records",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        32
      ],
      "parameters": {
        "width": 288,
        "height": 112,
        "content": "## Filter Only IP Records \n**Keep only A and AAAA records – we only need IPs for Shodan.**"
      }
    },
    {
      "id": "380083ad-569d-4f8c-b58f-8ce03a5c7c10",
      "name": "Filter: Only IP records1",
      "type": "n8n-nodes-base.if",
      "position": [
        -560,
        160
      ]
    },
    {
      "id": "47c21438-7fd4-4b10-8261-7c3ab4be547a",
      "name": "Prepare IP Item1",
      "type": "n8n-nodes-base.set",
      "position": [
        -336,
        96
      ]
    },
    {
      "id": "c5342a77-d1a7-4355-a92e-243e3c27ee0a",
      "name": "Rate-limit before Shodan",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -176,
        -32
      ],
      "parameters": {
        "width": 224,
        "height": 112,
        "content": "## Delay (rate-limit)\n**10 s pause – respects Shodan free-tier limits.**"
      }
    },
    {
      "id": "a2e1129b-384f-4f9c-8800-62043eee0448",
      "name": "Delay (rate-limit)",
      "type": "n8n-nodes-base.wait",
      "position": [
        -112,
        96
      ]
    },
    {
      "id": "b6145d1f-12d7-4d33-8e91-50ae8c7d0ddd",
      "name": "Shodan Search by IP",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        128,
        96
      ]
    },
    {
      "id": "e40280ab-f666-4581-876a-0e43d7819ac2",
      "name": "Parse Shodan JSON",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        272,
        128
      ],
      "parameters": {
        "width": null,
        "height": 96,
        "content": "## Parse Shodan Data\n**Flattens banners/ports into one row per service.**"
      }
    },
    {
      "id": "3b370770-6aad-49fb-8960-f5cb9bfbc3d8",
      "name": "Parse Shodan Data",
      "type": "n8n-nodes-base.code",
      "position": [
        352,
        256
      ]
    },
    {
      "id": "4ae3033f-dd7f-476d-a1a5-0bbaf2ea8a98",
      "name": "Write results",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        256
      ],
      "parameters": {
        "width": null,
        "height": 96,
        "content": "## Google Sheets\n**Append every row to Google Sheet.**"
      }
    },
    {
      "id": "9831dc5f-bf30-4f97-9302-14b14ad49628",
      "name": "Log to Google Sheets1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        576,
        256
      ]
    },
    {
      "id": "1b15654f-c659-405d-84bb-35ed99d52386",
      "name": "Notify: Results (console log)",
      "type": "n8n-nodes-base.set",
      "position": [
        800,
        400
      ]
    },
    {
      "id": "d3fdb919-60ff-4d55-94a3-c125f0b754a6",
      "name": "Error catcher",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        -112
      ],
      "parameters": {
        "width": null,
        "height": 112,
        "content": "## Error Handler\n**Any node that throws an error goes here (No-Op placeholder).**"
      }
    },
    {
      "id": "c5a8d4e2-4632-40de-a7b2-6def3a021ff4",
      "name": "Error Handler (catch)",
      "type": "n8n-nodes-base.noOp",
      "position": [
        576,
        16
      ]
    },
    {
      "id": "976995fd-ca58-4b4d-bbe6-35c75b0ca55c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        480
      ],
      "parameters": {
        "width": 1104,
        "height": 208,
        "content": "## Bug Bounty Target Recon\n**This n8n workflow performs automated reconnaissance on a domain: it starts with a manual trigger, lets you set a target domain (e.g., example.com), queries Google Public D"
      }
    }
  ],
  "connections": {
    "Prepare IP Item1": {
      "main": [
        [
          {
            "node": "Delay (rate-limit)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Shodan Data": {
      "main": [
        [
          {
            "node": "Log to Google Sheets1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Notify: Results (console log)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Error Handler (catch)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delay (rate-limit)": {
      "main": [
        [
          {
            "node": "Shodan Search by IP",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Target Domain1": {
      "main": [
        [
          {
            "node": "DNS Lookup (Google)1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Notify: Results (console log)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Error Handler (catch)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Shodan Search by IP": {
      "main": [
        [
          {
            "node": "Parse Shodan Data",
            "type": "main",
            "index": 0
          },
          {
            "node": "Error Handler (catch)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DNS Lookup (Google)1": {
      "main": [
        [
          {
            "node": "Extract DNS Records1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract DNS Records1": {
      "main": [
        [
          {
            "node": "Filter: Only IP records1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Log to Google Sheets1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log to Google Sheets1": {
      "main": [
        [
          {
            "node": "Notify: Results (console log)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter: Only IP records1": {
      "main": [
        [
          {
            "node": "Prepare IP Item1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Parse Shodan Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking 'Test workflow'": {
      "main": [
        [
          {
            "node": "Set Target Domain1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}