{
  "name": "Qualify inbound leads with AI and route them to Slack, HubSpot and Google Sheets",
  "tags": [],
  "nodes": [
    {
      "id": "template-overview",
      "name": "Template overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1010,
        -150
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "1-intake-and-configuration",
      "name": "1. Intake and configuration",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -470,
        150
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "2-free-data-quality-gate",
      "name": "2. Free data-quality gate",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        190,
        150
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "3-enrichment-without-a-paid-api",
      "name": "3. Enrichment without a paid API",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        650,
        30
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "4-ai-scoring-against-your-icp",
      "name": "4. AI scoring against your ICP",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1090,
        30
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "5-routing-by-tier",
      "name": "5. Routing by tier",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1530,
        -150
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "6-log-every-lead",
      "name": "6. Log every lead",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2470,
        170
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "webhook-inbound-lead",
      "name": "Receive Inbound Lead",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -460,
        300
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "set-icp-config",
      "name": "Set ICP and Scoring Rules",
      "type": "n8n-nodes-base.set",
      "position": [
        -240,
        300
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "normalize-lead-fields",
      "name": "Normalize Lead Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -20,
        300
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "validate-email",
      "name": "Validate Email and Detect Company Domain",
      "type": "n8n-nodes-base.code",
      "position": [
        200,
        300
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "if-business-email",
      "name": "Is It a Valid Business Email?",
      "type": "n8n-nodes-base.if",
      "position": [
        420,
        300
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "fetch-website",
      "name": "Fetch Lead Website",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        660,
        180
      ],
      "parameters": {},
      "retryOnFail": false,
      "typeVersion": 4.2
    },
    {
      "id": "extract-signals",
      "name": "Extract Buying Signals from Website",
      "type": "n8n-nodes-base.code",
      "position": [
        880,
        180
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "ai-score-lead",
      "name": "Score Lead Against ICP with AI",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1100,
        180
      ],
      "parameters": {},
      "typeVersion": 1.5
    },
    {
      "id": "openai-model",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1100,
        400
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "output-parser",
      "name": "Structured Lead Score",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1300,
        400
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "combine-score",
      "name": "Combine AI Verdict with Data Quality",
      "type": "n8n-nodes-base.code",
      "position": [
        1320,
        180
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "mark-disqualified",
      "name": "Mark Lead as Unqualified",
      "type": "n8n-nodes-base.code",
      "position": [
        2480,
        620
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "route-by-tier",
      "name": "Route Lead by Tier",
      "type": "n8n-nodes-base.switch",
      "position": [
        1540,
        180
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "slack-hot-alert",
      "name": "Alert Sales Team in Slack",
      "type": "n8n-nodes-base.slack",
      "onError": "continueRegularOutput",
      "position": [
        1800,
        0
      ],
      "parameters": {},
      "typeVersion": 2.3
    },
    {
      "id": "gmail-instant-reply",
      "name": "Send Instant Personalized Reply",
      "type": "n8n-nodes-base.gmail",
      "onError": "continueRegularOutput",
      "position": [
        2020,
        0
      ],
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "hubspot-hot",
      "name": "Create Hot Contact in HubSpot",
      "type": "n8n-nodes-base.hubspot",
      "onError": "continueRegularOutput",
      "position": [
        2240,
        0
      ],
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "hubspot-warm",
      "name": "Create Warm Contact in HubSpot",
      "type": "n8n-nodes-base.hubspot",
      "onError": "continueRegularOutput",
      "position": [
        1800,
        220
      ],
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "log-to-sheets",
      "name": "Log Every Lead to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        2480,
        320
      ],
      "parameters": {},
      "typeVersion": 4.5
    },
    {
      "id": "respond-webhook",
      "name": "Respond to Form",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2700,
        320
      ],
      "parameters": {},
      "typeVersion": 1.1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Score Lead Against ICP with AI",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Lead Website": {
      "main": [
        [
          {
            "node": "Extract Buying Signals from Website",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route Lead by Tier": {
      "main": [
        [
          {
            "node": "Alert Sales Team in Slack",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Warm Contact in HubSpot",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log Every Lead to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive Inbound Lead": {
      "main": [
        [
          {
            "node": "Set ICP and Scoring Rules",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Lead Fields": {
      "main": [
        [
          {
            "node": "Validate Email and Detect Company Domain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Lead Score": {
      "ai_outputParser": [
        [
          {
            "node": "Score Lead Against ICP with AI",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Mark Lead as Unqualified": {
      "main": [
        [
          {
            "node": "Log Every Lead to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Alert Sales Team in Slack": {
      "main": [
        [
          {
            "node": "Send Instant Personalized Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set ICP and Scoring Rules": {
      "main": [
        [
          {
            "node": "Normalize Lead Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Hot Contact in HubSpot": {
      "main": [
        [
          {
            "node": "Log Every Lead to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is It a Valid Business Email?": {
      "main": [
        [
          {
            "node": "Fetch Lead Website",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Mark Lead as Unqualified",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Warm Contact in HubSpot": {
      "main": [
        [
          {
            "node": "Log Every Lead to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Score Lead Against ICP with AI": {
      "main": [
        [
          {
            "node": "Combine AI Verdict with Data Quality",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Every Lead to Google Sheets": {
      "main": [
        [
          {
            "node": "Respond to Form",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Instant Personalized Reply": {
      "main": [
        [
          {
            "node": "Create Hot Contact in HubSpot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Buying Signals from Website": {
      "main": [
        [
          {
            "node": "Score Lead Against ICP with AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine AI Verdict with Data Quality": {
      "main": [
        [
          {
            "node": "Route Lead by Tier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Email and Detect Company Domain": {
      "main": [
        [
          {
            "node": "Is It a Valid Business Email?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}