{
  "name": "Praxica Web-to-Voice Lead Accelerator",
  "nodes": [
    {
      "parameters": {
        "options": {
          "allowOrigins": "*"
        }
      },
      "id": "1",
      "name": "Chat Trigger",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1,
      "position": [400, 400]
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "You are the Sharplight AI assistant. Your goal is to help users and, if they seem interested, offer to have an AI specialist call them immediately. If they agree, collect their Name and Phone Number."
        }
      },
      "id": "2",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.1,
      "position": [600, 400]
    },
    {
      "parameters": {
        "resource": "lead",
        "operation": "create",
        "lastName": "={{ $json[\"name\"] }}",
        "company": "Web Lead",
        "additionalFields": {
          "phone": "={{ $json[\"phone\"] }}",
          "description": "Requested instant AI call via website chat."
        }
      },
      "id": "3",
      "name": "Create Zoho Lead",
      "type": "n8n-nodes-base.zohoCrm",
      "typeVersion": 1,
      "position": [850, 400]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.vapi.ai/call",
        "authentication": "headerAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\n  \"phoneNumberId\": \"your_vapi_phone_number_id\",\n  \"assistantId\": \"your_vapi_assistant_id\",\n  \"customer\": {\n    \"number\": \"{{ $node[\"Create Zoho Lead\"].json[\"Phone\"] }}\",\n    \"name\": \"{{ $node[\"Create Zoho Lead\"].json[\"Last_Name\"] }}\"\n  },\n  \"assistantOverrides\": {\n    \"variableValues\": {\n      \"context\": \"They were just asking about pricing on the website.\"\n    }\n  }\n}",
        "options": {}
      },
      "id": "4",
      "name": "Trigger Vapi Call",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [1100, 400]
    }
  ],
  "connections": {
    "Chat Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Create Zoho Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Zoho Lead": {
      "main": [
        [
          {
            "node": "Trigger Vapi Call",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
