AutomationFlowsAI & RAG › Build a Whatsapp Customer Support Bot with Openai and CRM Integration

Build a Whatsapp Customer Support Bot with Openai and CRM Integration

ByAhmed Saadawi @ahmedsaadawi on n8n.io

This template is for businesses using WhatsApp for customer communication who want to automate support using AI and real-time CRM data — especially in retail, food & beverage, e-commerce, or service sectors. It’s ideal for self-hosted n8n users with access to OpenAI and a CRM…

Webhook trigger★★★★☆ complexityAI-powered26 nodesAgentOpenAI ChatOutput Parser StructuredHTTP Request ToolMemory Buffer WindowN8N Nodes Evolution Api
AI & RAG Trigger: Webhook Nodes: 26 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #8297 — we link there as the canonical source.

This workflow follows the Agent → HTTP Request Tool recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "9jAyoi6py4r2DQkS",
  "name": "Full Customer Support WhatsApp AI Bot for CRM-integrated Businesses",
  "tags": [],
  "nodes": [
    {
      "id": "18dcdb01-7416-4a81-bfcb-b5d8abd9faca",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        624,
        416
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "623e9a7b-3778-494f-a919-781feab402af",
      "name": "Orders System Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        1168,
        480
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "f6a27fb1-9291-4687-9625-8c9bea2375a1",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2112,
        480
      ],
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "8847a24d-1266-41fa-9dd1-8e6547716958",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1600,
        816
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "8fb14eb4-075d-45b4-a8b8-526f9d4651b8",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        48,
        768
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "c637dc10-ea64-4abd-83da-d9d7b67ec09a",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        320,
        784
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "662494b2-6e08-4e7c-8b8d-1caa3ef50490",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        304,
        992
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "b96229cd-3fb9-4a7c-8ec9-5e2e36b75a59",
      "name": "Branches System Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        1168,
        160
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "ef93f4fd-7e51-46fc-95a6-ab773df04579",
      "name": "Menu System Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        1168,
        320
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "11cd0c4c-4fe8-4da6-bc8e-f550dcd953c3",
      "name": "Complaints System Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        1168,
        656
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "d4fa3686-d1e3-497f-9d0d-bfe791673dbd",
      "name": "crm_search_tool",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        2384,
        880
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "2bba142d-e8c5-46ca-b233-51db289b6d5d",
      "name": "save_crm_record_tool",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        2272,
        1056
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "f1b6aeec-f44d-46f7-b03b-35b21035a4ae",
      "name": "get_loyalty_points_tool",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        2576,
        896
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "37799578-729f-44f4-8297-649b9bb01f01",
      "name": "items_search_tool",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        1952,
        1088
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "91a47de2-80d5-4b09-9743-4a4e654776d4",
      "name": "branches_search_tool",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        2112,
        1008
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "a71fb812-f415-4fc1-ba82-87e35a2fdf71",
      "name": "categories_search_tool",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        1856,
        928
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "9d30bfe0-001e-4445-976e-0df5a8254ac2",
      "name": "Webhook: Receive WhatsApp message",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -176,
        480
      ],
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "189e3ce1-fec1-4d94-be73-da703118b87e",
      "name": "AI Agent Router: Classify msg",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        144,
        480
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 2.2
    },
    {
      "id": "3f65f56d-2d6d-4741-a490-51c0ac854efc",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "f6a9d542-08a5-4c19-a1f3-6a906d10371e",
      "name": "Simple Memory-2",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1680,
        960
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "a1dd1634-3a8e-4fe8-b588-0a2a34c862b7",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        192,
        768
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "4ca9e41c-956c-4f2d-9dd7-8ab358b2fe0f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        0
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "a980ff51-7244-4ae3-bf8d-8cb7e328a5cf",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1536,
        0
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "8ae8e48b-169b-4108-a1dc-91846d6b67a3",
      "name": "Send WhatsApp Greeting",
      "type": "n8n-nodes-evolution-api.evolutionApi",
      "position": [
        1168,
        848
      ],
      "parameters": {},
      "notesInFlow": false,
      "retryOnFail": true,
      "typeVersion": 1
    },
    {
      "id": "464cada5-8d21-4d1a-ac0b-ef5abe8fdbff",
      "name": "Send Answer to User's WhatsApp",
      "type": "n8n-nodes-evolution-api.evolutionApi",
      "position": [
        2736,
        480
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "373b5088-b9cf-4bf5-b570-d2cb854a5f24",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -848,
        144
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "2afd05a4-c941-4b22-883c-c55f250c73c9",
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "Branches System Prompt",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Menu System Prompt",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Orders System Prompt",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Orders System Prompt",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Complaints System Prompt",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send WhatsApp Greeting",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send Answer to User's WhatsApp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent Router: Classify msg",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory-2": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "crm_search_tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent Router: Classify msg",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "items_search_tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Menu System Prompt": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Orders System Prompt": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "branches_search_tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "save_crm_record_tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Branches System Prompt": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "categories_search_tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "get_loyalty_points_tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Complaints System Prompt": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent Router: Classify msg",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent Router: Classify msg": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook: Receive WhatsApp message": {
      "main": [
        [
          {
            "node": "AI Agent Router: Classify msg",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This template is for businesses using WhatsApp for customer communication who want to automate support using AI and real-time CRM data — especially in retail, food & beverage, e-commerce, or service sectors. It’s ideal for self-hosted n8n users with access to OpenAI and a CRM…

Source: https://n8n.io/workflows/8297/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow automates enterprise resource planning (ERP) operations across Engineering, Finance, HR, and Admin departments for operations managers, ERP administrators, and business process owners wh

Agent, Gmail, Slack +6
AI & RAG

This workflow automates enterprise compliance governance using a multi-agent AI architecture. It targets compliance officers, legal teams, and risk managers who need continuous, jurisdiction-aware mon

Agent, OpenAI Chat, Memory Buffer Window +8
AI & RAG

This workflow automates credit operations onboarding by running KYC verification, credit bureau checks, identity validation, and sanctions screening through a single AI-powered agent. Built for credit

Agent, OpenAI Chat, Output Parser Structured +8
AI & RAG

This workflow automates credit operations onboarding by running KYC verification, credit bureau checks, identity validation, and sanctions screening through a single AI-powered agent. Built for credit

Agent, OpenAI Chat, Output Parser Structured +8
AI & RAG

This workflow automates end-to-end legal contract review and compliance governance for legal teams, contract managers, and risk officers. It solves the problem of manually reviewing uploaded contracts

Agent, OpenAI Chat, Memory Buffer Window +5