{
  "name": "Handle WhatsApp customer inquiries with AI and intent routing",
  "nodes": [
    {
      "id": "18ede450-1342-4afc-ae8a-e77cd6e0f5b3",
      "name": "Sticky Note - Main Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        1104
      ],
      "parameters": {
        "width": 566,
        "height": 960,
        "content": "## 💬 WhatsApp Customer Support Bot\n### ✨ Universal Template for ANY Business\n\n**What it does:**\n- Receives WhatsApp messages automatically\n- Classifies customer intent (product, contact, support)\n- Ro"
      }
    },
    {
      "id": "bcd03e0f-491a-4403-9415-1cbebb03990c",
      "name": "Sticky Note - Step 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        1072
      ],
      "parameters": {
        "width": 324,
        "height": 401,
        "content": "## 📱 Step 1: Receive WhatsApp Message\n\nWhatsApp Business API triggers the workflow when a customer sends a message.\n\nCaptures:\n- Chat ID\n- User ID\n- User name\n- Message text\n- Timestamp\n\nSupports text"
      }
    },
    {
      "id": "1dd7b535-b77a-43e3-a0c8-8ea2c5ef6f10",
      "name": "Sticky Note - Step 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        544,
        1072
      ],
      "parameters": {
        "width": 324,
        "height": 443,
        "content": "## 🧠 Step 2: Intent Classification\n\nAnalyzes the message to determine what the customer wants:\n\n**Intents Recognized:**\n- 🛍️ Product inquiry (monitors, CPUs, GPUs, etc.)\n- 📞 Contact information\n- 👋 Gr"
      }
    },
    {
      "id": "9d8b4954-a7ed-44d1-b0f5-722f129450b3",
      "name": "Sticky Note - Step 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        1072
      ],
      "parameters": {
        "width": 314,
        "height": 378,
        "content": "## 🔀 Step 3: Intelligent Routing\n\nRoutes to the best response handler based on intent:\n\n**Route 1**: Product inquiries → Pre-built catalog responses (fast, cost-effective)\n\n**Route 2**: Contact/hours "
      }
    },
    {
      "id": "185a07f9-2406-4ff8-9e26-c7897dc483e7",
      "name": "Sticky Note - Step 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1536,
        1056
      ],
      "parameters": {
        "width": 334,
        "height": 393,
        "content": "## 🤖 Step 4: AI Agent (For Complex Queries)\n\nGoogle Gemini AI handles:\n- Custom product recommendations\n- Comparison questions\n- Technical specifications\n- Build suggestions\n- Multi-step conversations"
      }
    },
    {
      "id": "9c249b38-41a9-4446-befb-a07aaa1076c4",
      "name": "Sticky Note - Step 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2000,
        1056
      ],
      "parameters": {
        "width": 324,
        "height": 354,
        "content": "## 📤 Step 5: Send WhatsApp Response\n\nFormats and sends the response back to the customer via WhatsApp.\n\nSupports:\n- Markdown formatting (bold, italic, lists)\n- Emojis for engagement\n- Links to product"
      }
    },
    {
      "id": "7fb04cfb-53c6-4424-96a4-0a28d0e2c551",
      "name": "WhatsApp Trigger - Receive Messages",
      "type": "n8n-nodes-base.whatsAppTrigger",
      "position": [
        176,
        1664
      ]
    },
    {
      "id": "06578f8a-5296-4b4e-a8d8-5757a5a346ca",
      "name": "Parse WhatsApp Message Data",
      "type": "n8n-nodes-base.code",
      "position": [
        384,
        1664
      ]
    },
    {
      "id": "d5e00bfe-a374-46f6-a058-e5c6d9bab965",
      "name": "Classify User Intent",
      "type": "n8n-nodes-base.code",
      "position": [
        608,
        1664
      ]
    },
    {
      "id": "7445df59-15a2-4734-a871-2d1559546523",
      "name": "Route by Intent",
      "type": "n8n-nodes-base.switch",
      "position": [
        848,
        1648
      ]
    },
    {
      "id": "81f8deee-e06b-496d-9c3b-b7edde36a79a",
      "name": "Generate Product Response",
      "type": "n8n-nodes-base.code",
      "position": [
        1120,
        1488
      ]
    },
    {
      "id": "8edafb90-588a-40ca-93b5-366fa5cbcf71",
      "name": "Generate Contact Info Response",
      "type": "n8n-nodes-base.code",
      "position": [
        1120,
        1664
      ]
    },
    {
      "id": "6454f0d9-1b24-4dec-820d-073ce268d1a2",
      "name": "Build AI System Prompt",
      "type": "n8n-nodes-base.code",
      "position": [
        1424,
        1664
      ]
    },
    {
      "id": "b13be1ed-6b8a-44a8-8dda-30ea5634eb00",
      "name": "AI Agent - Handle Complex Queries",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1632,
        1664
      ]
    },
    {
      "id": "ea4fbfc4-99fd-4fa0-9c86-a4093d1c5dbd",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1632,
        1520
      ]
    },
    {
      "id": "38a18571-b06e-450b-85fe-34b33e312569",
      "name": "Conversation Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1728,
        1808
      ]
    },
    {
      "id": "50a654e2-7c70-4b0c-99be-ca2ba890961e",
      "name": "Google Docs - Product Catalog (Optional)",
      "type": "n8n-nodes-base.googleDocsTool",
      "position": [
        1776,
        1504
      ]
    },
    {
      "id": "78c748ca-531b-4aaa-8d75-471bfe96d8d7",
      "name": "Format AI Response",
      "type": "n8n-nodes-base.code",
      "position": [
        1952,
        1664
      ]
    },
    {
      "id": "30eca11b-6aae-4db7-ad0a-1c58d6311d5a",
      "name": "Generate Default Response",
      "type": "n8n-nodes-base.code",
      "position": [
        1136,
        1872
      ]
    },
    {
      "id": "ec2b6512-76a0-4f25-a0eb-0f14615b070f",
      "name": "Send WhatsApp Response",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        2192,
        1664
      ]
    }
  ],
  "connections": {
    "Route by Intent": {
      "main": [
        [
          {
            "node": "Generate Product Response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate Contact Info Response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate Default Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format AI Response": {
      "main": [
        [
          {
            "node": "Send WhatsApp Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Conversation Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent - Handle Complex Queries",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Classify User Intent": {
      "main": [
        [
          {
            "node": "Route by Intent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build AI System Prompt": {
      "main": [
        [
          {
            "node": "AI Agent - Handle Complex Queries",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent - Handle Complex Queries",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate Default Response": {
      "main": [
        [
          {
            "node": "Build AI System Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Product Response": {
      "main": [
        [
          {
            "node": "Build AI System Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse WhatsApp Message Data": {
      "main": [
        [
          {
            "node": "Classify User Intent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Contact Info Response": {
      "main": [
        [
          {
            "node": "Build AI System Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent - Handle Complex Queries": {
      "main": [
        [
          {
            "node": "Format AI Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WhatsApp Trigger - Receive Messages": {
      "main": [
        [
          {
            "node": "Parse WhatsApp Message Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Docs - Product Catalog (Optional)": {
      "ai_tool": [
        [
          {
            "node": "AI Agent - Handle Complex Queries",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}