πŸ’¬ Automate restaurant customer service with WhatsApp and Llama AI chatbot

⚑ 27,109 views Β· πŸ’¬ Support Chatbots

Description

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 communication, boosts efficiency, and improves customer satisfaction.

Objectives

Workflow Summary

Step 1: Message Reception

Node: WhatsApp Trigger (Webhook or API-based) Function: Listens for incoming customer messages.

Step 2: Intent Recognition

Node: AI Query Processor (e.g., OpenAI API) Function: Detects customer intent (e.g., booking, menu, timing).

Step 3: Conditional Routing

Node: Switch or IF Node Function: Routes flow based on detected intent:

Step 4A: Respond to General Info Queries

Node: AI Response or Static Reply Node Function: Returns relevant information (menu, timing, address, etc.).

Step 4B: Process Booking Requests

Nodes:

Step 5: Context Management

Node: Set/Update Customer Data Function: Maintains conversation state and tracks follow-up messages.

Database or Google Sheet Columns for Table Booking

Column NameDescription
reservation_idUnique reservation identifier
guest_nameFull name of the guest
contact_numberCustomer’s WhatsApp or mobile number
email(Optional) Email address
booking_dateReservation date (YYYY-MM-DD format)
booking_timeReservation time (HH:MM format)
party_sizeNumber of guests
table_id(Optional) Table number or identifier
special_requestsAllergies, seating preferences, etc.
statusBooking status: Confirmed / Cancelled / Pending
created_atTimestamp when booking was made
updated_atTimestamp when booking was last modified

Prerequisites

Setup Instructions

  1. Connect WhatsApp API using webhook or third-party WhatsApp provider (e.g., 360Dialog, Twilio).
  2. Integrate AI using HTTP Request or OpenAI node for response generation.
  3. Create Data Store (Google Sheet, Airtable, or MySQL) with defined booking columns.
  4. Design Workflow in n8n with intent detection, conditional logic, and response nodes.
  5. Test End-to-End by sending different WhatsApp queries and checking logs and stored data.

Example Conversation

Customer: β€œCan I book a table for 2 people tomorrow at 8 PM?” Bot: β€œSure. Please provide your name and contact number to confirm the reservation for 2 people at 8:00 PM tomorrow.” [Booking details are saved, and a confirmation is sent.]

Benefits

Analytics and Reporting

Track key performance metrics such as:

Security and Compliance

Conclusion

This WhatsApp chatbot serves as a reliable, AI-powered digital front desk for restaurants. Built using n8n and scalable components, it automates customer support, manages bookings, and enhances operational efficiency while offering a seamless customer experience.

πŸ”— Nodes Used

Postgres, WhatsApp Business Cloud, AI Agent, Ollama Chat Model, WhatsApp Trigger

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup