{
  "name": "Qualify & route leads across channels with GPT-4o, Slack & CRM integration",
  "nodes": [
    {
      "id": "87b304de-91b5-45a3-bda0-901812662913",
      "name": "Email Trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        4624,
        3488
      ]
    },
    {
      "id": "a65a643f-5daa-4a1b-9056-b475d15f088a",
      "name": "Form Submission Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        4624,
        3680
      ]
    },
    {
      "id": "3bfe7c3d-3ffc-423e-98ac-882115871880",
      "name": "Merge Inputs",
      "type": "n8n-nodes-base.merge",
      "position": [
        4848,
        3584
      ]
    },
    {
      "id": "a6b72464-b3c4-4737-8205-9695b54def91",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        5072,
        3584
      ]
    },
    {
      "id": "c27ff33d-3ffa-474b-9ce2-3a691b3099fb",
      "name": "Validate Input Data",
      "type": "n8n-nodes-base.code",
      "position": [
        5296,
        3584
      ]
    },
    {
      "id": "e770dba1-d250-4af5-9286-c11e37b21c92",
      "name": "Check Validation",
      "type": "n8n-nodes-base.if",
      "position": [
        5520,
        3584
      ]
    },
    {
      "id": "cad2ba36-5c01-45c9-b018-2f6b02a5d0b4",
      "name": "Parse AI Response",
      "type": "n8n-nodes-base.code",
      "position": [
        6096,
        3488
      ]
    },
    {
      "id": "c21948dc-f3c6-45e0-965a-84088865a7af",
      "name": "Calculate Lead Score",
      "type": "n8n-nodes-base.code",
      "position": [
        6320,
        3488
      ]
    },
    {
      "id": "44b4da8a-8531-4ade-9a2f-ab36b72ad723",
      "name": "Route by Territory",
      "type": "n8n-nodes-base.switch",
      "position": [
        6544,
        3472
      ]
    },
    {
      "id": "a21e9adb-f9cd-4777-b93b-90d83eebe5de",
      "name": "Create HubSpot Contact",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        6768,
        3392
      ]
    },
    {
      "id": "5a66f775-7468-4d26-a15e-656ee0bef1b4",
      "name": "Create Salesforce Lead",
      "type": "n8n-nodes-base.salesforce",
      "position": [
        6768,
        3584
      ]
    },
    {
      "id": "32f7110b-6959-416c-9d81-97d6cca18c3e",
      "name": "Post to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        6992,
        3488
      ]
    },
    {
      "id": "a0a91663-c96c-4241-a68d-f23321485bc8",
      "name": "Log to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        7216,
        3488
      ]
    },
    {
      "id": "702156e9-9ea0-4c23-ba93-d0c1fbc7bd0d",
      "name": "Log Validation Failure",
      "type": "n8n-nodes-base.set",
      "position": [
        5808,
        3680
      ]
    },
    {
      "id": "209c94df-6322-4966-a1f8-a8ceaba25dd4",
      "name": "Log Failed Leads",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        6096,
        3680
      ]
    },
    {
      "id": "8b5cc002-3b62-494e-b255-9523f719f825",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4544,
        3208
      ],
      "parameters": {
        "width": 1152,
        "height": 632,
        "content": "# 🟡 Intake & Configuration\n\n\n## Update workflow configuration node: complete all fields\n\n## Add Google credentials\n\n## Your Google Sheet needs two headings: Leads, Failed Leads"
      }
    },
    {
      "id": "daa43d30-6209-4176-8864-7eac0fbde1d6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5688,
        3088
      ],
      "parameters": {
        "width": 784,
        "height": 752,
        "content": "## 🧠 AI Extraction & Scoring\n\n## Enter Open AI credentials \n\n## AI calculates the lead score based on company, size, industry, role, problem, region, budget\n\n## Lead scoring (0-100)\n \n\n## Failed lead "
      }
    },
    {
      "id": "e6abb887-5d52-4e87-a3b5-05b28da27d93",
      "name": "Sticky Note - Routing",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6488,
        3088
      ],
      "parameters": {
        "width": 880,
        "height": 656,
        "content": "## 📨 Routing & Notifications\n\n## Add credentials for HubSpot or Salesforce\n\n## Add Slack credentials "
      }
    },
    {
      "id": "e5414e6c-3e26-4e49-9659-ba5a99034ced",
      "name": "Extract Lead Data with AI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        5744,
        3488
      ]
    }
  ],
  "connections": {
    "Merge Inputs": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Trigger": {
      "main": [
        [
          {
            "node": "Merge Inputs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post to Slack": {
      "main": [
        [
          {
            "node": "Log to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Validation": {
      "main": [
        [
          {
            "node": "Extract Lead Data with AI",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log Validation Failure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI Response": {
      "main": [
        [
          {
            "node": "Calculate Lead Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Territory": {
      "main": [
        [
          {
            "node": "Create HubSpot Contact",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Salesforce Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Input Data": {
      "main": [
        [
          {
            "node": "Check Validation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Lead Score": {
      "main": [
        [
          {
            "node": "Route by Territory",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create HubSpot Contact": {
      "main": [
        [
          {
            "node": "Post to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Salesforce Lead": {
      "main": [
        [
          {
            "node": "Post to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Validation Failure": {
      "main": [
        [
          {
            "node": "Log Failed Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Validate Input Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Form Submission Webhook": {
      "main": [
        [
          {
            "node": "Merge Inputs",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Extract Lead Data with AI": {
      "main": [
        [
          {
            "node": "Parse AI Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}