{
  "name": "Qualify and score leads in Airtable with OpenAI and Slack alerts",
  "nodes": [
    {
      "id": "d14041b6-d191-4a69-ad19-f647aad42cdb",
      "name": "Trigger: New Lead Created",
      "type": "n8n-nodes-base.airtableTrigger",
      "position": [
        -144,
        -320
      ]
    },
    {
      "id": "5a2add48-cba8-4fb1-af26-7e4ec33e5685",
      "name": "Normalize & Standardize Lead Data",
      "type": "n8n-nodes-base.set",
      "position": [
        96,
        -320
      ]
    },
    {
      "id": "b5d33a59-816f-4175-8f95-95a31e1fe3d7",
      "name": "Guard: Skip Already Processed Leads",
      "type": "n8n-nodes-base.if",
      "position": [
        304,
        -320
      ]
    },
    {
      "id": "7c6d0b48-e983-4eb8-9058-5763ec0f5f3c",
      "name": "Exit: Already Processed",
      "type": "n8n-nodes-base.noOp",
      "position": [
        528,
        -32
      ]
    },
    {
      "id": "eb40b73a-8fde-4bc2-ae12-1503fcf39338",
      "name": "Prepare AI Scoring Context",
      "type": "n8n-nodes-base.set",
      "position": [
        544,
        -336
      ]
    },
    {
      "id": "1be3882d-08cc-4a70-8063-bd385752c9f0",
      "name": "AI Lead Qualification (GPT)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        800,
        -336
      ]
    },
    {
      "id": "7c68db5a-c1e9-44d6-989d-498fb5105363",
      "name": "Validate & Parse AI Response",
      "type": "n8n-nodes-base.code",
      "position": [
        1136,
        -336
      ]
    },
    {
      "id": "7d8bb4e6-d838-4d4a-9bdf-45f42bfb9f16",
      "name": "AI Response Validation",
      "type": "n8n-nodes-base.if",
      "position": [
        864,
        -64
      ]
    },
    {
      "id": "de8b1dc2-90d4-4949-8360-ed342a87c13c",
      "name": "Merge Valid & Fallback Paths",
      "type": "n8n-nodes-base.merge",
      "position": [
        1136,
        -64
      ]
    },
    {
      "id": "9671bf02-fb74-4405-ad32-bd188fc396ba",
      "name": "Alert: AI Scoring Failure",
      "type": "n8n-nodes-base.slack",
      "position": [
        1136,
        224
      ]
    },
    {
      "id": "f0894b0c-13fd-4723-9742-d98b4d80c38e",
      "name": "Hybrid Lead Scoring Engine",
      "type": "n8n-nodes-base.code",
      "position": [
        1456,
        -272
      ]
    },
    {
      "id": "6bf92f87-2d41-47f1-aaa2-c0ee717c9a72",
      "name": "Prepare CRM Update Payload",
      "type": "n8n-nodes-base.set",
      "position": [
        1808,
        -272
      ]
    },
    {
      "id": "7fc88fb3-720d-4dc6-b61c-1c7eddb99c97",
      "name": "Update Lead Record (CRM)",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1824,
        -48
      ]
    },
    {
      "id": "037cc655-0103-4472-9eed-4093f6d9deef",
      "name": "Prepare Hot Lead Notification",
      "type": "n8n-nodes-base.set",
      "position": [
        2112,
        -48
      ]
    },
    {
      "id": "7a39ed59-600c-4930-8359-8b264684dce8",
      "name": "Decision: Is High-Intent Lead?",
      "type": "n8n-nodes-base.if",
      "position": [
        2256,
        -336
      ]
    },
    {
      "id": "4a1e3829-ae4d-44be-b883-81ab748f007c",
      "name": "Notify Sales Team – Hot Lead",
      "type": "n8n-nodes-base.slack",
      "position": [
        2464,
        -352
      ]
    },
    {
      "id": "5cfe888a-794b-4e1e-a1fd-8117c5c77d08",
      "name": "Exit: No Sales Notification",
      "type": "n8n-nodes-base.noOp",
      "position": [
        2464,
        -32
      ]
    },
    {
      "id": "dc26a99e-38c2-4743-a16d-ef39fb40086d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -816,
        -608
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "d3fd89d7-f129-4b2d-a739-eae0b04d961e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        -496
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "5454a239-90f5-42bc-b8cf-e2da7908301f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        768,
        -496
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "fc813e38-4e27-4c7b-9585-e1adfdd465a6",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1344,
        -496
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "01462396-8611-43bc-a6ec-cc1b45d5aef1",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        -480
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "5cd59010-7672-4f63-83e5-64b2f2aa6b1a",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2048,
        -480
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "AI Response Validation": {
      "main": [
        [
          {
            "node": "Merge Valid & Fallback Paths",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge Valid & Fallback Paths",
            "type": "main",
            "index": 1
          },
          {
            "node": "Alert: AI Scoring Failure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Lead Record (CRM)": {
      "main": [
        [
          {
            "node": "Prepare Hot Lead Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger: New Lead Created": {
      "main": [
        [
          {
            "node": "Normalize & Standardize Lead Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Hybrid Lead Scoring Engine": {
      "main": [
        [
          {
            "node": "Prepare CRM Update Payload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare AI Scoring Context": {
      "main": [
        [
          {
            "node": "AI Lead Qualification (GPT)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare CRM Update Payload": {
      "main": [
        [
          {
            "node": "Update Lead Record (CRM)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Lead Qualification (GPT)": {
      "main": [
        [
          {
            "node": "Validate & Parse AI Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Valid & Fallback Paths": {
      "main": [
        [
          {
            "node": "Hybrid Lead Scoring Engine",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate & Parse AI Response": {
      "main": [
        [
          {
            "node": "AI Response Validation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Hot Lead Notification": {
      "main": [
        [
          {
            "node": "Decision: Is High-Intent Lead?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Decision: Is High-Intent Lead?": {
      "main": [
        [
          {
            "node": "Notify Sales Team – Hot Lead",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Exit: No Sales Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize & Standardize Lead Data": {
      "main": [
        [
          {
            "node": "Guard: Skip Already Processed Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Guard: Skip Already Processed Leads": {
      "main": [
        [
          {
            "node": "Prepare AI Scoring Context",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Exit: Already Processed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}