{
  "name": "Lead scoring & auto-assignment with GPT-4 and GoHighLevel + Slack alerts",
  "nodes": [
    {
      "id": "ebc88344-2f0b-4be4-bd6b-3e4ecdfafaa0",
      "name": "GHL New Contact Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [
        624,
        240
      ]
    },
    {
      "id": "678da6b8-11e1-44ac-86e0-9cfb7ed20c63",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        848,
        240
      ]
    },
    {
      "id": "7178c526-d24a-4d17-8c52-b2b4c239c4da",
      "name": "GHL Get Contact Details",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1600,
        240
      ]
    },
    {
      "id": "c97cd3d4-c870-49c5-a08d-fbcdd688bde8",
      "name": "GHL Fetch Engagement Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1824,
        240
      ]
    },
    {
      "id": "37d1a1ac-309b-4ba3-b987-d41517ae0faa",
      "name": "Clean Contact Data",
      "type": "n8n-nodes-base.set",
      "position": [
        2064,
        240
      ]
    },
    {
      "id": "ca04c9e3-ed83-4f3d-8618-094e4e22f3e8",
      "name": "Prepare AI Input",
      "type": "n8n-nodes-base.set",
      "position": [
        2288,
        240
      ]
    },
    {
      "id": "51c119d7-418b-438a-a7a2-581b9a6c3dfa",
      "name": "AI Lead Scoring (GPT-4)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        608,
        640
      ]
    },
    {
      "id": "ca9b2c9b-ac36-4797-b564-b47e31623b4e",
      "name": "Parse Score to Numeric",
      "type": "n8n-nodes-base.code",
      "position": [
        944,
        640
      ]
    },
    {
      "id": "4b470389-b753-44a7-a878-94331ab1b466",
      "name": "IF Score >= 80 (Hot)",
      "type": "n8n-nodes-base.if",
      "position": [
        1536,
        816
      ]
    },
    {
      "id": "cca339a2-a20b-4f38-aa49-826e777d53da",
      "name": "IF Score >= 40 (Warm)",
      "type": "n8n-nodes-base.if",
      "position": [
        1776,
        960
      ]
    },
    {
      "id": "f6d6e6ee-751e-4469-b9d0-45bbca1a2338",
      "name": "GHL Tag Hot Lead",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1776,
        640
      ]
    },
    {
      "id": "7e6b965a-4674-49d6-b647-08f92865bfc2",
      "name": "GHL Tag Warm Lead",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2000,
        864
      ]
    },
    {
      "id": "100d401f-dd79-4c77-a898-d9c35be2a6dc",
      "name": "GHL Tag Cold Lead",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2000,
        1056
      ]
    },
    {
      "id": "a729731e-75ca-404b-90c1-65df321d7ebe",
      "name": "GHL Assign Hot to Top Rep",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2000,
        640
      ]
    },
    {
      "id": "218ac94c-d90c-4e57-817a-a1c17f1b1fb0",
      "name": "GHL Assign Warm to Secondary Rep",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2256,
        864
      ]
    },
    {
      "id": "920d5d20-6010-498c-ba44-c9367b7d38ee",
      "name": "GHL Assign Cold to Nurture Team",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2256,
        1056
      ]
    },
    {
      "id": "6a5266a8-d058-4104-b736-ea883cdc425a",
      "name": "Slack Notify Hot Lead",
      "type": "n8n-nodes-base.slack",
      "position": [
        2256,
        640
      ]
    },
    {
      "id": "7c000ee2-d5fc-49e0-bff1-283ec806cc94",
      "name": "Webhook Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2736,
        864
      ]
    },
    {
      "id": "dc1ed977-f1fa-4eab-a626-639bf126ca5b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -816,
        304
      ],
      "parameters": {
        "width": 1328,
        "height": 416,
        "content": "## How it works\nThis workflow scores every new GoHighLevel contact with AI and routes them to the right sales owner.\n\nA webhook trigger fires when a new contact is created in GHL. The workflow fetches"
      }
    },
    {
      "id": "cc06656c-32c1-4791-9fe9-0b2761495c08",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        64
      ],
      "parameters": {
        "width": 416,
        "height": 352,
        "content": "## Trigger & Config\n\nReceives new contacts from GoHighLevel via webhook and loads core config: API key, base URL, owner IDs, and Slack channel."
      }
    },
    {
      "id": "cdf4c58c-361f-4db9-8d5b-623327695eed",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1552,
        64
      ],
      "parameters": {
        "width": 880,
        "height": 352,
        "content": "## Contact & Engagement Data\n\nPulls full contact details and engagement history from GHL, then cleans and structures the data into a compact JSON payload for AI scoring."
      }
    },
    {
      "id": "aaf1107a-c37b-47b2-b268-8b9597354884",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        512
      ],
      "parameters": {
        "width": 544,
        "height": 304,
        "content": "## AI Lead Scoring\n\nUses AI to score the lead (1–100) and return segment + reasoning. The parser converts the AI output into numeric fields used for routing."
      }
    },
    {
      "id": "9e5550d6-7434-40c2-bdf9-4328227404dd",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1504,
        480
      ],
      "parameters": {
        "width": 976,
        "height": 752,
        "content": "## Route & Assign\n\nRoutes leads based on score: Hot, Warm, or Cold. Tags the contact, assigns the right owner in GHL, and sends a Slack alert for Hot leads."
      }
    }
  ],
  "connections": {
    "GHL Tag Hot Lead": {
      "main": [
        [
          {
            "node": "GHL Assign Hot to Top Rep",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare AI Input": {
      "main": [
        [
          {
            "node": "AI Lead Scoring (GPT-4)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GHL Tag Cold Lead": {
      "main": [
        [
          {
            "node": "GHL Assign Cold to Nurture Team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GHL Tag Warm Lead": {
      "main": [
        [
          {
            "node": "GHL Assign Warm to Secondary Rep",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean Contact Data": {
      "main": [
        [
          {
            "node": "Prepare AI Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF Score >= 80 (Hot)": {
      "main": [
        [
          {
            "node": "GHL Tag Hot Lead",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "IF Score >= 40 (Warm)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF Score >= 40 (Warm)": {
      "main": [
        [
          {
            "node": "GHL Tag Warm Lead",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "GHL Tag Cold Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack Notify Hot Lead": {
      "main": [
        [
          {
            "node": "Webhook Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Score to Numeric": {
      "main": [
        [
          {
            "node": "IF Score >= 80 (Hot)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "GHL Get Contact Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Lead Scoring (GPT-4)": {
      "main": [
        [
          {
            "node": "Parse Score to Numeric",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GHL Get Contact Details": {
      "main": [
        [
          {
            "node": "GHL Fetch Engagement Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GHL New Contact Trigger": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GHL Assign Hot to Top Rep": {
      "main": [
        [
          {
            "node": "Slack Notify Hot Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GHL Fetch Engagement Data": {
      "main": [
        [
          {
            "node": "Clean Contact Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GHL Assign Cold to Nurture Team": {
      "main": [
        [
          {
            "node": "Webhook Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GHL Assign Warm to Secondary Rep": {
      "main": [
        [
          {
            "node": "Webhook Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}