{
  "name": "Score and route qualified leads to Notion and Matrix",
  "nodes": [
    {
      "id": "3f35599e-e911-4f67-b900-44ceefa51291",
      "name": "📌 Lead Scoring Pipeline – Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        48
      ],
      "parameters": {
        "width": 550,
        "height": 690,
        "content": "## How it works\nThis workflow runs on a schedule, pulls the latest form submissions, enriches each lead with Clearbit data, and generates a numeric score based on firmographic and demographic signals."
      }
    },
    {
      "id": "9459faf6-b2ed-4352-a8eb-3754e9214e65",
      "name": "🗂️ Data Collection",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -176,
        64
      ],
      "parameters": {
        "width": 562,
        "height": 670,
        "content": "## Data Collection\nThis section is responsible for regularly polling the external form provider for brand-new submissions. The **Schedule Trigger** fires based on the CRON rule you define (default eve"
      }
    },
    {
      "id": "7306ea3a-fe2a-4411-b7ff-43da4ff8407c",
      "name": "🔍 Enrichment & Scoring",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        64
      ],
      "parameters": {
        "width": 1026,
        "height": 654,
        "content": "## Enrichment & Scoring\nAfter basic validation, each lead flows into **Clearbit Enrichment** where person + company data are fetched in real-time. A **Merge – Combine Lead & Enrichment** node stitches"
      }
    },
    {
      "id": "d32ca77c-155b-4dd1-949b-88507de1cd4b",
      "name": "💾 Storage & Notification",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1776,
        -32
      ],
      "parameters": {
        "width": 914,
        "height": 766,
        "content": "## Storage & Notification\nQualified leads are persisted to a Notion CRM database via **Notion – Create Qualified Lead Page** and immediately broadcast to your sales chat with **Matrix Notify – New Qua"
      }
    },
    {
      "id": "27d535c5-9159-40f3-8510-1d4001edcbd2",
      "name": "Schedule – Every 15 min",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -144,
        400
      ]
    },
    {
      "id": "8b046e08-2f92-4448-b390-2bf6277cb304",
      "name": "Fetch New Leads",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        64,
        400
      ]
    },
    {
      "id": "14e85ac3-dbfd-46d7-add0-a50b01bb6d94",
      "name": "IF – Any Leads?",
      "type": "n8n-nodes-base.if",
      "position": [
        272,
        400
      ]
    },
    {
      "id": "2b7a297a-03a2-47e4-969e-6bea27cb479d",
      "name": "Split In Batches",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        464,
        400
      ]
    },
    {
      "id": "76742d38-a023-4e9c-a738-819357bd0062",
      "name": "IF – Valid Email?",
      "type": "n8n-nodes-base.if",
      "position": [
        672,
        400
      ]
    },
    {
      "id": "9a96782c-f809-41f5-a414-9e2a1f8d1e54",
      "name": "Wait 1 s (Rate-limit)",
      "type": "n8n-nodes-base.wait",
      "position": [
        864,
        256
      ]
    },
    {
      "id": "6cb7070b-2287-48cd-bf86-cf0fd2ffb178",
      "name": "Set – Lead Basics",
      "type": "n8n-nodes-base.set",
      "position": [
        864,
        400
      ]
    },
    {
      "id": "ca21aeaf-05b9-403e-945e-1f9f2fe7b910",
      "name": "Clearbit Enrichment",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1072,
        400
      ]
    },
    {
      "id": "8133f5e9-209a-49c4-bf79-95d0eaf1376d",
      "name": "Merge – Combine Lead & Enrichment",
      "type": "n8n-nodes-base.merge",
      "position": [
        1264,
        400
      ]
    },
    {
      "id": "2ac4391b-582f-4aa6-9f05-89f7a516abfb",
      "name": "Code – Calculate Lead Score",
      "type": "n8n-nodes-base.code",
      "position": [
        1472,
        400
      ]
    },
    {
      "id": "5566a1af-8b17-484e-8642-49cb6c94e981",
      "name": "Set – Build Notion Props",
      "type": "n8n-nodes-base.set",
      "position": [
        1664,
        400
      ]
    },
    {
      "id": "6d8ae485-ccf5-4db7-a049-f38c40127a40",
      "name": "IF – Qualified?",
      "type": "n8n-nodes-base.if",
      "position": [
        1872,
        400
      ]
    },
    {
      "id": "24953229-b0e5-4dc3-81e4-c29f61c5f735",
      "name": "Notion – Create Qualified Lead Page",
      "type": "n8n-nodes-base.notion",
      "position": [
        2064,
        288
      ]
    },
    {
      "id": "03dd0d65-b623-430d-afb0-0299e7072105",
      "name": "Code – Build Matrix Message",
      "type": "n8n-nodes-base.code",
      "position": [
        2272,
        288
      ]
    },
    {
      "id": "e6cc1220-2d80-490d-82e6-ffd552f2acad",
      "name": "Matrix Notify – New Qualified Lead",
      "type": "n8n-nodes-base.matrix",
      "position": [
        2464,
        288
      ]
    },
    {
      "id": "f02f114a-7ceb-4113-bb8a-adbd5808f6d9",
      "name": "Notion – Archive Disqualified Lead",
      "type": "n8n-nodes-base.notion",
      "position": [
        2064,
        528
      ]
    }
  ],
  "connections": {
    "Fetch New Leads": {
      "main": [
        [
          {
            "node": "IF – Any Leads?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split In Batches": {
      "main": [
        [
          {
            "node": "IF – Valid Email?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF – Any Leads?": {
      "main": [
        [
          {
            "node": "Split In Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF – Qualified?": {
      "main": [
        [
          {
            "node": "Notion – Create Qualified Lead Page",
            "type": "main",
            "index": 0
          },
          {
            "node": "Code – Build Matrix Message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Notion – Archive Disqualified Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clearbit Enrichment": {
      "main": [
        [
          {
            "node": "Merge – Combine Lead & Enrichment",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "IF – Valid Email?": {
      "main": [
        [
          {
            "node": "Wait 1 s (Rate-limit)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set – Lead Basics": {
      "main": [
        [
          {
            "node": "Merge – Combine Lead & Enrichment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 1 s (Rate-limit)": {
      "main": [
        [
          {
            "node": "Set – Lead Basics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule – Every 15 min": {
      "main": [
        [
          {
            "node": "Fetch New Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set – Build Notion Props": {
      "main": [
        [
          {
            "node": "IF – Qualified?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code – Build Matrix Message": {
      "main": [
        [
          {
            "node": "Matrix Notify – New Qualified Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code – Calculate Lead Score": {
      "main": [
        [
          {
            "node": "Set – Build Notion Props",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge – Combine Lead & Enrichment": {
      "main": [
        [
          {
            "node": "Code – Calculate Lead Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notion – Create Qualified Lead Page": {
      "main": [
        [
          {
            "node": "Code – Build Matrix Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}