{
  "name": "Report spam and phishing URLs from IMAP mailboxes to Spamhaus",
  "nodes": [
    {
      "id": "9c98c067-3864-4883-87b7-45cc42685945",
      "name": "Phishing Trigger",
      "type": "n8n-nodes-base.emailReadImap",
      "position": [
        -672,
        200
      ]
    },
    {
      "id": "55d791f1-63d8-4e3c-abb9-654cf858d6bc",
      "name": "Spam Trigger",
      "type": "n8n-nodes-base.emailReadImap",
      "position": [
        -672,
        8
      ]
    },
    {
      "id": "ae2fdea3-fb44-427a-a1b5-0cbd619f9dbf",
      "name": "initial config spam",
      "type": "n8n-nodes-base.set",
      "position": [
        -448,
        8
      ]
    },
    {
      "id": "1acc162e-d4b2-4df4-a3f4-d0ee068c8dd5",
      "name": "extract all URLs",
      "type": "n8n-nodes-base.code",
      "position": [
        0,
        128
      ]
    },
    {
      "id": "414a22ba-0b8b-407b-9580-83a075ab095e",
      "name": "create item for spamhaus",
      "type": "n8n-nodes-base.set",
      "position": [
        896,
        128
      ]
    },
    {
      "id": "f807f2a9-0ad5-42e8-be72-4303675fdb45",
      "name": "Spamhaus submit url",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1120,
        128
      ]
    },
    {
      "id": "93a56dc1-6d80-4dc0-bb27-5c8cc9335c5c",
      "name": "Loop over each email",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -224,
        128
      ]
    },
    {
      "id": "a1e6a6b4-256f-4fd2-9d9c-f727b69ffd8a",
      "name": "initial phish config",
      "type": "n8n-nodes-base.set",
      "position": [
        -448,
        200
      ]
    },
    {
      "id": "69de29e4-4376-4a1e-948c-023be95f660e",
      "name": "aggregate all into a single list",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1344,
        200
      ]
    },
    {
      "id": "7eb3f398-772f-4c83-b789-2f4fc69e2ca4",
      "name": "add run specific job",
      "type": "n8n-nodes-base.noOp",
      "position": [
        0,
        -64
      ]
    },
    {
      "id": "e5c8271d-6aa7-4051-a974-1d16c3794f99",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        464
      ],
      "parameters": {
        "width": 832,
        "height": 624,
        "content": "# Report URLs to Spamhaus\nThis workflow is designed to automate the process of reporting malicious URLs to Spamhaus based on real spam or phishing emails that you receive in your mailbox.\n\nIt monitors"
      }
    },
    {
      "id": "00ea0b3e-751d-4363-b0ca-fc45eef373b4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -64
      ],
      "parameters": {
        "width": 432,
        "height": 448,
        "content": "# Triggers"
      }
    },
    {
      "id": "56e9bb71-35c7-4032-8bd6-047194a096c0",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        64
      ],
      "parameters": {
        "width": 1760,
        "height": 320,
        "content": "# Process each email individually"
      }
    },
    {
      "id": "fd34571d-f8f2-40c4-90a1-b697602d8da7",
      "name": "add email specific job",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1568,
        200
      ]
    },
    {
      "id": "95ef1592-1db0-492d-9888-75bd3e494624",
      "name": "de-duplicate URLs",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        224,
        128
      ]
    },
    {
      "id": "48354390-e58c-47ea-a6eb-71dc0eeb1540",
      "name": "split URLs to array",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        448,
        128
      ]
    },
    {
      "id": "b0595adf-1dda-47a2-a9da-de2dea2fc60d",
      "name": "filter out URLs that match regexes",
      "type": "n8n-nodes-base.filter",
      "position": [
        672,
        128
      ]
    }
  ],
  "connections": {
    "Spam Trigger": {
      "main": [
        [
          {
            "node": "initial config spam",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Phishing Trigger": {
      "main": [
        [
          {
            "node": "initial phish config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "extract all URLs": {
      "main": [
        [
          {
            "node": "de-duplicate URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "de-duplicate URLs": {
      "main": [
        [
          {
            "node": "split URLs to array",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Spamhaus submit url": {
      "main": [
        [
          {
            "node": "aggregate all into a single list",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "initial config spam": {
      "main": [
        [
          {
            "node": "Loop over each email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "split URLs to array": {
      "main": [
        [
          {
            "node": "filter out URLs that match regexes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop over each email": {
      "main": [
        [
          {
            "node": "add run specific job",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "extract all URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "initial phish config": {
      "main": [
        [
          {
            "node": "Loop over each email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "add email specific job": {
      "main": [
        []
      ]
    },
    "create item for spamhaus": {
      "main": [
        [
          {
            "node": "Spamhaus submit url",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "aggregate all into a single list": {
      "main": [
        [
          {
            "node": "Loop over each email",
            "type": "main",
            "index": 0
          },
          {
            "node": "add email specific job",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "filter out URLs that match regexes": {
      "main": [
        [
          {
            "node": "create item for spamhaus",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}