AI Restaurant Customer Service and Order Processing System - n8n Workflow

Use this sophisticated n8n workflow template to automate restaurant order taking, menu queries (RAG), and customer management via WhatsApp using Google Gemini AI and Supabase.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Restaurant owners seeking to automate their ordering process.
Technical users looking for advanced n8n templates integrating AI agents and vector databases.
Developers needing a ready-to-deploy conversational commerce solution using the n8n node ecosystem.
Businesses using Supabase for database and vector storage.

Overview

Managing customer orders and menu questions manually via messaging apps is time-consuming. This comprehensive n8n workflow solves this by deploying a powerful AI Agent integrated with WhatsApp.

This robust solution uses a Google Gemini model within the n8n agent node to understand natural language orders and answer specific menu questions using Retrieval Augmented Generation (RAG). The menu data is stored securely in a Supabase Vector Store. When a customer sends a message via WhatsApp, the n8n trigger captures it, verifies the user, engages the AI agent, processes the order using a Supabase tool, and finally confirms the order back to the customer and notifies the kitchen/delivery staff. This high-value n8n workflow minimizes errors and provides instant customer service 24/7.

How it Works

This advanced n8n workflow operates in two main segments: Customer Interaction and Menu Management.

1. Customer Interaction Flow (Triggered by WhatsApp):


  1. The flow begins with the WhatsApp trigger when a new message is received.

  2. The workflow attempts to Get the user details from the Supabase database.

  3. The Check if user exists n8n node uses logic to determine if the customer is new. New users are automatically added to the database via the Add user to db Supabase node.

  4. The core of the system, the AI Agent n8n node, takes over. It uses the Google Gemini Chat Model for reasoning and the Simple Memory node to maintain conversation context.

  5. The AI Agent uses two critical tools:

The Get Menu Items from Vector Store node, enabling RAG to look up current menu items stored in Supabase.
The Create order in database node, which is executed when the AI successfully parses a complete order.

  1. After the AI processes the request, the Send last message WhatsApp node sends the appropriate response (menu answer or order confirmation) back to the customer.

  2. A final If node checks if a confirmed order was placed. If so, a second WhatsApp node, Send Order to delevery guy, notifies the relevant internal team.

2. Menu Management Flow (Triggered by Form):


  1. Internal staff uses the Add menu item n8n trigger (a Form Trigger) to submit new dishes or update prices.

  2. The data is processed by the Default Data Loader.

  3. The Embeddings Google Gemini node creates vector embeddings for the new menu item.

  4. The Insert Menu Item to Vector Store n8n node places this item and its vector representation into the Supabase database, updating the knowledge base instantly for the AI Agent's RAG capabilities.

Installation Guide

To set up this powerful n8n workflow, follow these steps:


  1. Import: Copy the provided JSON and paste it into your n8n canvas to import this n8n template.

  2. Credentials Setup: You will need to configure credentials for the following services:

WhatsApp: Set up your WhatsApp Business Platform account and connect the WhatsApp n8n node credentials to both the trigger and the action nodes.
Supabase: Configure your Supabase connection for database operations (User Management) and Vector Store operations (Menu RAG).
* Google Gemini/LangChain: Ensure your Google Gemini API key is configured for the Google Gemini Chat Model and Embeddings nodes. This is crucial for the AI Agent to function.

  1. Webhook Activation: Ensure the WhatsApp trigger and the 'Add menu item' Form Trigger webhooks are active and correctly linked to their respective external services (WhatsApp webhook configuration and internal form submission link).

  2. Vector Store Initialization: Ensure your Supabase vector store is correctly set up with the necessary table structure for menu items, matching the configuration in the Vector Store n8n node.

Node Details

WhatsApp Trigger: This is the primary n8n trigger, initiating the n8n workflow upon receiving a message from a customer.
Get user (Supabase): Checks the Supabase database to identify if the incoming customer number has been seen before.
AI Agent (LangChain): The central decision-making n8n node. It manages conversation state, tool usage (Supabase), and LLM interaction using the Google Gemini Chat Model.
Google Gemini Chat Model: Provides the large language model capability for understanding customer intent, parsing orders, and generating conversational responses within the AI Agent.
Simple Memory (LangChain): Maintains the conversation history across messages, allowing the AI Agent to reference previous context for better order processing.
Create order in database (Supabase Tool): An AI tool used by the n8n Agent to log successful, parsed orders directly into the transactional Supabase database.
Get Menu Items from Vector Store (Supabase Vector Store): An RAG tool used by the AI Agent to query the embedded menu data, ensuring accurate and up-to-date responses to menu inquiries.
Embeddings Google Gemini: Used in the Menu Management segment to transform raw menu data into high-quality vector embeddings for efficient similarity search.


  • Send last message (WhatsApp): The final action n8n node in the customer flow, delivering the AI's response or order confirmation back to the customer.

Related n8n Workflows

Paid

Nodes: 14 Nodes
Updated: December 26 2025
View all
Created by

Software Engineer

Featured*