{
  "name": "Streamline lead intake and AI routing using Typeform, OpenAI & Gmail",
  "nodes": [
    {
      "id": "dc878070-ff34-420a-9dc1-fc424cff19a2",
      "name": "Typeform Trigger",
      "type": "n8n-nodes-base.typeformTrigger",
      "position": [
        18704,
        8864
      ]
    },
    {
      "id": "c940fd71-1b77-4b79-9d96-304944ed1a4b",
      "name": "Create a record",
      "type": "n8n-nodes-base.airtable",
      "position": [
        19152,
        8864
      ]
    },
    {
      "id": "76196c55-0439-4cf6-a4e3-1e2a53e6ba5e",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        20176,
        8576
      ]
    },
    {
      "id": "8c48b5f2-abac-4ea0-8be6-1125282b6812",
      "name": "Sanitize Lead Data",
      "type": "n8n-nodes-base.code",
      "position": [
        18928,
        8864
      ]
    },
    {
      "id": "bdea441c-8727-4ec8-807e-a25a353ff112",
      "name": "AI Lead Analyzer",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        19456,
        8800
      ]
    },
    {
      "id": "0be203f6-8ec4-45ce-a4c8-f276cc16ced2",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        19760,
        8928
      ]
    },
    {
      "id": "e6e881fd-d725-4d3e-8395-86afac41cc21",
      "name": "Route by Category",
      "type": "n8n-nodes-base.switch",
      "position": [
        19952,
        8832
      ]
    },
    {
      "id": "c3898c4d-52bf-4b41-9c3b-3a56369efa38",
      "name": "Send a message1",
      "type": "n8n-nodes-base.gmail",
      "position": [
        20176,
        8768
      ]
    },
    {
      "id": "1b995c4f-8cf5-40a0-af0c-a4a21a13f8cc",
      "name": "Send a message2",
      "type": "n8n-nodes-base.gmail",
      "position": [
        20176,
        8960
      ]
    },
    {
      "id": "d6ed4acf-4e8b-4030-a8f5-1aac44b80797",
      "name": "Send a message3",
      "type": "n8n-nodes-base.gmail",
      "position": [
        20176,
        9152
      ]
    },
    {
      "id": "09140fcd-1e23-4b4b-9b79-39d64fb61157",
      "name": "Send a message4",
      "type": "n8n-nodes-base.discord",
      "position": [
        20400,
        8576
      ]
    },
    {
      "id": "ebb701ce-e6b3-4318-b582-ff6029ceb521",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        17520,
        8256
      ],
      "parameters": {
        "width": 1072,
        "height": 1120,
        "content": "**Lead intake and AI intelligence with Typeform, Airtable, and OpenAI**\n\n**What this workflow does**\n\n* Captures new submissions from Typeform in real time\n* Cleans and standardizes lead data\n* Stores"
      }
    },
    {
      "id": "c2fde15d-58b6-45e8-9b18-c392b514cb59",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        18608,
        8256
      ],
      "parameters": {
        "width": 480,
        "height": 1120,
        "content": "# Step 1\nPhase: Inbound & Cleaning\nTypeform Trigger: Listens for the formId: UBdasOKD submission.\n\nSanitize Lead Data: Runs JavaScript to Title Case names, lowercase emails, and extract the domain for"
      }
    },
    {
      "id": "12af5fcf-3778-4ad6-a04f-a111343f3fb6",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        19104,
        8256
      ],
      "parameters": {
        "width": 272,
        "height": 1120,
        "content": "# Step 2\nPhase: The \"Source of Truth\"\nCreate a Record: Instantly pushes the sanitized data into Airtable. This ensures that even if the AI or Email steps fail later, you never lose the lead data."
      }
    },
    {
      "id": "a324c214-c81d-41fe-899f-524ef83c76da",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        19392,
        8256
      ],
      "parameters": {
        "width": 480,
        "height": 1120,
        "content": "# Step 3\nPhase: AI Intelligence\nAI Lead Analyzer: Passes the message to GPT-4o-mini.\n\nLogic: The AI assigns a category, lead_score, and priority.\n\nMerge: The workflow combines the original Airtable re"
      }
    },
    {
      "id": "5bbd07ca-6765-460e-b4bf-c4759a1ef781",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        19888,
        8256
      ],
      "parameters": {
        "width": 816,
        "height": 1120,
        "content": "# Step 4\nPhase: Routing & Response\nRoute by Category: The Switch Node reads the AI's \"Category\" output.\n\nGmail (Branches):\n\nSales: Sends a high-energy \"Let's Build\" email.\n\nSupport/Partnership/Default"
      }
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Route by Category",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message": {
      "main": [
        [
          {
            "node": "Send a message4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a record": {
      "main": [
        [
          {
            "node": "AI Lead Analyzer",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "AI Lead Analyzer": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Typeform Trigger": {
      "main": [
        [
          {
            "node": "Sanitize Lead Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Category": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a message1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a message2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a message3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sanitize Lead Data": {
      "main": [
        [
          {
            "node": "Create a record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}