{
  "name": "Score and route leads with Telegram alerts and Box storage",
  "nodes": [
    {
      "id": "7f75e700-cc72-42b5-b324-06349c0040d9",
      "name": "⚡️ Lead Scoring Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        32
      ],
      "parameters": {
        "width": 550,
        "height": 866,
        "content": "## How it works\nThis workflow listens for new lead submissions via a secure webhook, normalises field names and validates that the essential data is present. If the submission is complete, it enriches"
      }
    },
    {
      "id": "4b5c7db8-a498-4658-875c-d1faa40278e7",
      "name": "📥 Intake & Validation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        32
      ],
      "parameters": {
        "width": 450,
        "height": 830,
        "content": "## Intake & Validation\nThis group handles all incoming lead data.  The **Lead Form Webhook** node receives raw submissions from any external form provider and forwards them to **Normalize Lead Data**,"
      }
    },
    {
      "id": "ce618659-25cf-400b-a5b7-22ae0db72b53",
      "name": "🧠 Enrichment & Scoring",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        32
      ],
      "parameters": {
        "width": 738,
        "height": 830,
        "content": "## Enrichment & Scoring\nValid leads are enriched with Clearbit’s Combined Find endpoint, which appends firmographic and demographic insights.  The **Merge Enriched Data** node combines the original su"
      }
    },
    {
      "id": "41fb2512-4250-4b67-b877-cbdcc18e4b77",
      "name": "🚦 Qualification & Routing",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        32
      ],
      "parameters": {
        "width": 738,
        "height": 814,
        "content": "## Qualification & Routing\nA simple threshold-based IF node (**Qualified Lead?**) determines whether the lead is hot enough for Sales or should be nurtured by Marketing.  Each branch builds a JSON fil"
      }
    },
    {
      "id": "a3dac70f-ce3a-42ac-b2b2-ce495fffce30",
      "name": "🛠️ Error Handling",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2016,
        32
      ],
      "parameters": {
        "width": 1010,
        "height": 814,
        "content": "## Error Handling & Ops\nThe **Workflow Error Trigger** node listens for any unhandled exceptions during execution.  When triggered, it pushes a concise error summary to the Operations Telegram channel"
      }
    },
    {
      "id": "706ae1fc-aaaa-4df5-a4b6-86b27782f0aa",
      "name": "Lead Form Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        128,
        384
      ]
    },
    {
      "id": "10a8cb1a-da98-4c70-a020-c3c0cccf677e",
      "name": "Normalize Lead Data",
      "type": "n8n-nodes-base.set",
      "position": [
        336,
        384
      ]
    },
    {
      "id": "0966fd6a-ef19-47ec-9f75-c69f246f4084",
      "name": "Validate Required Fields",
      "type": "n8n-nodes-base.code",
      "position": [
        528,
        384
      ]
    },
    {
      "id": "c530aa12-9b3c-44f4-9221-b356c0e847bd",
      "name": "Has Required Fields?",
      "type": "n8n-nodes-base.if",
      "position": [
        736,
        384
      ]
    },
    {
      "id": "708e99e6-2216-4128-87fb-786b2a271d1e",
      "name": "Enrich with Clearbit",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        928,
        384
      ]
    },
    {
      "id": "78425d66-11a6-474b-88b2-ea0ff9fd6bdc",
      "name": "Merge Enriched Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        1136,
        384
      ]
    },
    {
      "id": "1320b348-137e-4bf8-896b-b8d31f885a18",
      "name": "Calculate Lead Score",
      "type": "n8n-nodes-base.code",
      "position": [
        1328,
        384
      ]
    },
    {
      "id": "6372ed09-c458-483c-a8a5-ee5316a2c1f2",
      "name": "Prepare Lead Record",
      "type": "n8n-nodes-base.set",
      "position": [
        1536,
        384
      ]
    },
    {
      "id": "6fc67a41-d525-4609-a128-c27bc0c08cde",
      "name": "Qualified Lead?",
      "type": "n8n-nodes-base.if",
      "position": [
        1728,
        384
      ]
    },
    {
      "id": "6c94f31a-35da-4f2e-b5d0-d9d4afb3e389",
      "name": "Build Lead JSON (Qualified)",
      "type": "n8n-nodes-base.code",
      "position": [
        2144,
        304
      ]
    },
    {
      "id": "2541e981-8218-4a32-bbe6-6b1606ad2139",
      "name": "Upload to Box (Qualified)",
      "type": "n8n-nodes-base.box",
      "position": [
        2336,
        288
      ]
    },
    {
      "id": "34dc72fb-71d8-4c43-8d6f-e5e943710e8c",
      "name": "Notify Sales (Qualified)",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2544,
        240
      ]
    },
    {
      "id": "b531b854-c3cc-461c-903b-c2af2c48cee9",
      "name": "Build Lead JSON (Unqualified)",
      "type": "n8n-nodes-base.code",
      "position": [
        2144,
        528
      ]
    },
    {
      "id": "76191d8f-2cfe-4b89-a222-e21383130aa0",
      "name": "Upload to Box (Unqualified)",
      "type": "n8n-nodes-base.box",
      "position": [
        2336,
        528
      ]
    },
    {
      "id": "9c1d1cd2-aeb4-4b62-a9c9-72e7151bdbc4",
      "name": "Notify Marketing (Unqualified)",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2608,
        528
      ]
    },
    {
      "id": "21f2bab1-9202-449f-be8f-f1a410903ca5",
      "name": "Notify Marketing (Invalid Submission)",
      "type": "n8n-nodes-base.telegram",
      "position": [
        928,
        592
      ]
    }
  ],
  "connections": {
    "Qualified Lead?": {
      "main": [
        [
          {
            "node": "Build Lead JSON (Qualified)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Build Lead JSON (Unqualified)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lead Form Webhook": {
      "main": [
        [
          {
            "node": "Normalize Lead Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Enriched Data": {
      "main": [
        [
          {
            "node": "Calculate Lead Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Lead Data": {
      "main": [
        [
          {
            "node": "Validate Required Fields",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Enriched Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Prepare Lead Record": {
      "main": [
        [
          {
            "node": "Qualified Lead?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Lead Score": {
      "main": [
        [
          {
            "node": "Prepare Lead Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enrich with Clearbit": {
      "main": [
        [
          {
            "node": "Merge Enriched Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Required Fields?": {
      "main": [
        [
          {
            "node": "Enrich with Clearbit",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Notify Marketing (Invalid Submission)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Required Fields": {
      "main": [
        [
          {
            "node": "Has Required Fields?",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Enriched Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Upload to Box (Qualified)": {
      "main": [
        [
          {
            "node": "Notify Sales (Qualified)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Lead JSON (Qualified)": {
      "main": [
        [
          {
            "node": "Upload to Box (Qualified)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to Box (Unqualified)": {
      "main": [
        [
          {
            "node": "Notify Marketing (Unqualified)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Lead JSON (Unqualified)": {
      "main": [
        [
          {
            "node": "Upload to Box (Unqualified)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}