AutomationFlowsAI & RAG › WhatsApp Restaurant Chatbot with AI

WhatsApp Restaurant Chatbot with AI

Original n8n title: Automate Restaurant Customer Service with Whatsapp and Llama AI Chatbot

ByOneclick AI Squad @oneclick-ai on n8n.io

An intelligent WhatsApp-based chatbot designed for restaurants to automate customer interactions related to table bookings, menu inquiries, opening hours, services, and offers. Built using the n8n automation platform and powered by an AI language model, this solution streamlines…

Event trigger★★★★☆ complexityAI-powered9 nodesWhatsAppWhatsApp TriggerAgentOllama ChatPostgres
AI & RAG Trigger: Event Nodes: 9 Complexity: ★★★★☆ AI nodes: yes Added:

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

This workflow follows the Agent → Ollama Chat 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": "OQuVjQzqswmDM86W",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "WhatsApp Chatbot \u2013 Restaurant Info Assistant (Bookings, Menu, Timing)",
  "tags": [],
  "nodes": [
    {
      "id": "2990c149-51a8-4fa8-a9a6-2fe4c4e42b72",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        -620
      ],
      "parameters": {
        "width": 1000,
        "content": "## This workflow powers a WhatsApp chatbot that answers customer questions about restaurant timing, menu, booking, services, and offers.\n\n## It uses a chat model (LLM) to understand queries and respond clearly via WhatsApp.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "32a367b4-c14d-47f8-9ba1-483772e30564",
      "name": "Send Reply to Customer",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        636,
        -140
      ],
      "parameters": {
        "textBody": "={{ $json.output }}",
        "operation": "send",
        "phoneNumberId": "550325331503475",
        "additionalFields": {},
        "recipientPhoneNumber": "={{ $('Receive WhatsApp Message').item.json.contacts[0].wa_id }}"
      },
      "credentials": {
        "whatsAppApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "44c64110-9c14-411b-9e12-9843510696d2",
      "name": "Wait For Response",
      "type": "n8n-nodes-base.wait",
      "position": [
        196,
        -240
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "3021f85b-00af-417b-8022-dc5f717e4ab7",
      "name": "Receive WhatsApp Message",
      "type": "n8n-nodes-base.whatsAppTrigger",
      "position": [
        -400,
        -240
      ],
      "parameters": {
        "options": {},
        "updates": [
          "messages"
        ]
      },
      "credentials": {
        "whatsAppTriggerApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "34cf3695-d559-43ab-b720-e419c1094aee",
      "name": "Extract Customer Query",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -180,
        -240
      ],
      "parameters": {
        "text": "={{ $json.messages[0].text.body }}",
        "options": {
          "systemMessage": "=**You are a helpful and friendly WhatsApp chatbot for a restaurant.**\nWhen a customer sends a message, greet them politely and provide clear, short replies to their questions about:\n\n* Restaurant timings (opening/closing hours)\n* Table booking or reservation availability\n* Menu items (food types, popular dishes, specials)\n* Restaurant location or directions\n* Services offered (dine-in, takeaway, delivery)\n* Pricing and current offers\n* Confirming or cancelling a reservation\n\nIf the customer asks something unrelated to the restaurant, reply:\n\ud83d\udfe2 *\u201cI\u2019m here to help with restaurant-related questions. Would you like to know our timings, menu, or book a table?\u201d*\n\nIf a message is unclear or incomplete, respond with:\n\ud83d\udfe2 *\u201cCould you please clarify your question so I can assist you better?\u201d*\n\nAlways keep the conversation short, polite, and informative.\n\n"
        },
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "92c21a3b-01ad-4ec7-97e2-e5816f23ff81",
      "name": "Generate Reply with AI",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        -92,
        -20
      ],
      "parameters": {
        "model": "llama3.2-16000:latest",
        "options": {}
      },
      "credentials": {
        "ollamaApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "dd5381b8-337a-4b60-857c-4c84b682edd6",
      "name": "Check If Table Booking Required",
      "type": "n8n-nodes-base.if",
      "position": [
        416,
        -240
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "0282b709-8b08-4831-ab40-5725db7d6034",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "Booking",
              "rightValue": "add_your_value_here"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "6fd96474-c7b2-444c-9f9e-960f6897a76d",
      "name": "Create New Table Booking",
      "type": "n8n-nodes-base.postgres",
      "position": [
        636,
        -340
      ],
      "parameters": {
        "table": {
          "__rl": true,
          "mode": "name",
          "value": "id"
        },
        "schema": {
          "__rl": true,
          "mode": "list",
          "value": "public"
        },
        "columns": {
          "value": {},
          "schema": [],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.6
    },
    {
      "id": "f5a58ce9-c39e-40bf-989a-328e8e1a67b3",
      "name": "Send Booking Confirmation to Customer",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        856,
        -340
      ],
      "parameters": {
        "textBody": "={{ $json.output }}",
        "operation": "send",
        "phoneNumberId": "550325331503475",
        "additionalFields": {},
        "recipientPhoneNumber": "={{ $('Receive WhatsApp Message').item.json.contacts[0].wa_id }}"
      },
      "credentials": {
        "whatsAppApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "3bedc946-ce52-4aaa-b868-96b0e6b59b1b",
  "connections": {
    "Wait For Response": {
      "main": [
        [
          {
            "node": "Check If Table Booking Required",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Customer Query": {
      "main": [
        [
          {
            "node": "Wait For Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Reply with AI": {
      "ai_languageModel": [
        [
          {
            "node": "Extract Customer Query",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Create New Table Booking": {
      "main": [
        [
          {
            "node": "Send Booking Confirmation to Customer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive WhatsApp Message": {
      "main": [
        [
          {
            "node": "Extract Customer Query",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Table Booking Required": {
      "main": [
        [
          {
            "node": "Create New Table Booking",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Reply to Customer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

An intelligent WhatsApp-based chatbot designed for restaurants to automate customer interactions related to table bookings, menu inquiries, opening hours, services, and offers. Built using the n8n automation platform and powered by an AI language model, this solution streamlines…

Source: https://n8n.io/workflows/5881/ — 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

CashMate – Your AI-Powered WhatsApp Finance Agent Turn WhatsApp into a smart finance assistant that auto-registers you, logs transactions in natural language, extracts data from receipts and voice not

Tool Code, Output Parser Structured, Tool Calculator +6
AI & RAG

Transform your WhatsApp into a powerful personal finance command center. This AI-powered workflow converts natural language messages into structured financial data, automates record-keeping, and deliv

Tool Code, Output Parser Structured, OpenRouter Chat +6
AI & RAG

This workflow is built for sales teams, agencies, and small businesses that receive inbound leads via WhatsApp and want to automate their first response, lead qualification, and CRM logging — without

Agent, Google Sheets, Google Calendar +4
AI & RAG

This n8n workflow automates personalized travel assistance via WhatsApp through a friendly virtual agent named Alex. It helps users plan trips, explore destinations, get visa/weather/hotel information

WhatsApp Trigger, Agent, Memory Buffer Window +2
AI & RAG

Transform your salon/service business with this streamlined WhatsApp automation system featuring Claude integration, zero-setup database management, and intelligent conversation handling. Claude MCP I

WhatsApp Trigger, WhatsApp, Redis +11