How to Build a WhatsApp AI Automation Agent for Your Restaurant or Online Business (Without Coding)
If you run a restaurant, a food delivery service, or sell products online, you already know the grind: someone messages you, you reply manually, they ask about the menu, you send it again, they place an order, you type it into a sheet. Multiply that by 50 customers a day and it becomes a full-time job.
This guide walks you through building a WhatsApp AI agent that handles all of that automatically menu display, customer queries, order collection, and even delivery address capture using n8n (a free, open-source automation platform) connected to OpenAI and Google Sheets. No coding required. You set it up once, and it runs 24/7.
What This AI Agent Actually Does
Before jumping into setup, here's what the finished system looks like in practice:
A customer messages your WhatsApp number with "Hi." The bot instantly replies with a welcome message and asks what they need. They type "menu" the full menu is sent back automatically, pulled live from your Google Sheet.
They try to order an out-of-stock item the bot declines it politely and suggests alternatives. They confirm their order the bot collects their name, address, and table number or delivery address, then logs the complete order to your Google Sheet.
You only see the finished orders. You don't touch any messages.
The system also handles FAQs. Delivery time? Payment methods? Opening hours? You add those answers to a sheet once, and the AI pulls from them whenever a customer asks.
What You Need Before Starting
- A Hostinger VPS (to host n8n 24/7) KVM 1 or KVM 2 plan is sufficient
- A Meta for Business account (for WhatsApp Business API access)
- An OpenAI API account with some credits ($5–$10 is enough to start)
- A Google account (for Google Sheets)
- A Google Cloud Console account (free)
Total estimated cost: around ₹10,000–₹12,000 per year, which is roughly what you'd pay a human assistant for a single month.
Step 1: Set Up Your VPS Hosting on Hostinger
n8n needs to run on a server, not your laptop, because it has to stay active at all times. A VPS (Virtual Private Server) is the most cost-effective way to do this.
Go to Hostinger's website and navigate to Services → VPS Hosting. You'll see four plans. For a single restaurant or small business, KVM 1 or KVM 2 is more than enough.
Tip: Use a new Gmail account when signing up to qualify for the maximum new-user discount. You can also apply a coupon code at checkout for an additional 10% off.
Select your preferred plan, choose a 12 or 24-month billing period (longer periods are cheaper per month), and complete payment.
Step 2: Install n8n on Your VPS
Once payment is confirmed, you'll land on the Hostinger dashboard.
- Click Get Started
- In the search bar, type n8n
- Select n8n from the results
- Choose your timezone — select Asia/Kolkata
- Click Deploy
The server will configure itself automatically. When it's done, you'll see n8n listed with a status indicator. Click Open to launch it.
Step 3: Create Your n8n Account
The first time n8n opens, it asks you to create an account. Fill in:
- Email address
- First name, last name
- Password (save this somewhere secure — you'll need it every time you log in)
After account creation, n8n will ask a few onboarding questions. You can answer them as:
- Company type: Software as a Service or Education
- Role: Business Owner
- Automation for: Myself
- Company size: Less than 20
- How did you hear about us: YouTube
Then click Get Started.
Step 4: Activate Your n8n License Key
n8n will send a free lifetime license key to your email. Check your inbox, copy the key, and click Activate in the n8n interface.
Once activated, click Start from Scratch to enter the workflow editor.
Step 5: Import the Pre-Built Workflow Template
Instead of building the workflow from zero, you'll import a ready-made template. In the workflow editor:
- Click the three-dot menu (top right)
- Select Import from File
- Upload the template file (available on the creator's Telegram channel link in the video description)
Once imported, your workflow will appear with the following nodes already connected:
- WhatsApp Trigger — activates when a customer sends any message
- OpenAI Chat Model — reads the message and decides what to do
- FAQ Node — fetches answers from your FAQ Google Sheet
- Menu Node — reads your menu from Google Sheets
- Orders Node — writes new orders to your Orders Google Sheet
- Simple Memory — keeps track of the last 10 messages so the AI has conversation context
- Send Message Node — sends the AI's reply back to WhatsApp
Step 6: Set Up Your Google Sheets
You need three sheets inside one Google Spreadsheet:
Sheet 1: Menu
Columns: Item Name, Quantity Available, Price, Status (Available/Out of Stock)
Sheet 2: Orders
Columns: Customer Name, Address/Table Number, Mobile Number, Item Ordered, Order Date, Status
Sheet 3: FAQ
Columns: Question, Answer
Add your menu items, prices, and stock status to the Menu sheet. Add common questions and their answers to the FAQ sheet. The Orders sheet stays empty the AI fills it automatically every time someone places an order.
The key advantage here: update your Google Sheet and the changes reflect on WhatsApp instantly. Mark an item as "Out of Stock" in the sheet, and the bot stops accepting orders for it immediately.
Step 7: Connect Meta (WhatsApp Business API)
This is the most involved step, but take it one part at a time.
7a. Create a Meta App
Go to business.facebook.com and log in. Navigate to:
Settings → Apps → Add → Create a New App ID
Give the app a name (e.g., "n8n Automation"), enter your email, and click Next. When asked what type of app, select Others → Business. Click Create App.
7b. Get Your App ID and App Secret
Your App ID appears on the app dashboard copy it.
For the App Secret, go to App Settings → Basic, click Show next to App Secret, and copy it.
In n8n, open the WhatsApp Trigger node, click Create New Credential, and paste your App ID and App Secret. Click Save you should see "Connection tested successfully."
7c. Generate an Access Token and Phone Number ID
Inside your Meta app, go to WhatsApp → API Setup. Select your Business Portfolio and click Continue.
Click Generate Access Token. Copy it and paste it into the n8n Send Message node credential fields.
For the Phone Number ID: on the same API Setup page, click Manage Phone Number List, verify your number with the OTP sent to your phone, and copy the Phone Number ID that appears.
Important note: In development/testing mode, the access token expires every 24 hours. For a live business deployment, you'll need to go through Meta's business verification and use a permanent token. The testing setup is fine for learning and demos.
Step 8: Connect OpenAI
Go to platform.openai.com and create an account. Before generating an API key, add credits to your account:
- Click Add Credit
- Enter your card details
- Add $5 or $10 this is enough for thousands of conversations
- Turn off auto-recharge to avoid unexpected charges
Then go to API Keys → Create New Secret Key. Name it anything (e.g., "Restaurant Bot"), set permissions to All, and click Create. Copy the key immediately you cannot view it again after closing this window.
In n8n, open the OpenAI Chat Model node, click Create New Credential, paste your API key, and save.
Step 9: Connect Google Sheets
To read from and write to your Google Sheets, you need to authorize n8n via Google Cloud.
9a. Create a Google Cloud Project
Go to console.cloud.google.com. Click Select a Project → New Project, name it "n8n Automation," and click Create.
9b. Enable Required APIs
Go to APIs & Services → Library. Search for and enable:
- Google Sheets API
- Google Drive API
9c. Create OAuth Credentials
Go to APIs & Services → OAuth Consent Screen → Get Started. Set app name to "n8n," enter your email, select External audience, and continue through the setup.
Then go to Credentials → Create Credentials → OAuth Client ID. Select Web Application, name it "n8n," and paste the Redirect URI from your n8n Google Sheets node. Click Create.
Copy your Client ID and Client Secret and paste them into the n8n Google Sheets credential dialog. Click Sign in with Google, authorize access, and you should see "Successfully connected."
If you get an error during authorization, go to OAuth Consent Screen → Audience → Add Users and add your Gmail address as a test user, then try again.
Step 10: Configure the Sheet Connections in n8n
Open each Google Sheets node in your workflow:
FAQ Node: Select your spreadsheet, choose the FAQ sheet tab, operation = Get Rows.
Menu Node: Same spreadsheet, select the Menu sheet tab.
Orders Node: Same spreadsheet, select the Orders sheet tab, operation = Append Row. The column mapping should be set to "Defined by the model" so OpenAI automatically fills in the correct fields.
Step 11: Publish and Test
Click Publish in the top-right corner of n8n and confirm with Got It.
Click Execute Workflow to activate it, then open WhatsApp and message your connected number. Type "Hi."
If everything is connected correctly, the bot replies within seconds. You can then test ordering a menu item, asking an FAQ question, and completing a full order to verify everything logs to your Google Sheet.
Extending the System
Once the basic flow works, you can add more capabilities:
Payment collection: Add a UPI node that sends customers a payment link or QR code before confirming the order.
Order status updates: Build a second flow that messages customers when their order status changes in the sheet.
Multi-language support: Instruct the OpenAI node to detect the customer's language and reply accordingly.
Product catalog: The same setup works for clothing stores, electronics resellers, or any product-based business — just update the Google Sheet with your catalog.
Cost Comparison: AI Agent vs. Human Staff
| Human Order Manager | WhatsApp AI Agent | |
|---|---|---|
| Monthly cost | ₹15,000–₹20,000 | ~₹1,000–₹1,200 |
| Working hours | 8–10 hrs/day | 24/7 |
| Languages | 1–2 | Multilingual |
| Simultaneous chats | 1 | Unlimited |
| Annual cost | ₹1,80,000+ | ~₹12,000–₹15,000 |
The math is straightforward. The AI doesn't take breaks, doesn't make typos when logging orders, and doesn't miss late-night orders because it was asleep.
Troubleshooting Common Issues
"Connection tested successfully" but no message received: Make sure you clicked Execute Workflow after publishing. The trigger needs to be actively listening.
Access token error after 24 hours: This is expected in development mode. Generate a new token from the Meta API Setup page and update the credential in n8n. For production, switch to a verified business account for a permanent token.
Google Sheets authorization error: Add your Gmail address as a test user under OAuth Consent Screen → Audience in Google Cloud Console.
Bot replies but order not logged to sheet: Check the Orders node make sure the operation is set to Append Row and the correct sheet tab is selected.
Final Thoughts
This setup replaces a repetitive, time-consuming part of running a small business with a system that costs less than a Netflix subscription per month to operate. The technical steps look long on paper, but each one is mechanical no decisions to make, just following a sequence.
The real value comes after setup: every order logged automatically, no missed messages, no customer left waiting for a reply at 2 AM.
If you run into issues during setup or want a version customized for a specific business type (clothing store, bakery, service bookings), the workflow template is flexible enough to handle most variations with changes only to the Google Sheet structure and the OpenAI system prompt.
https://youtu.be/v30OzVZahbk?si=klDW73liy8y-W5hx
Tools used in this guide: n8n (self-hosted), OpenAI GPT-4, WhatsApp Business API via Meta for Developers, Google Sheets, Google Cloud Console, Hostinger VPS



















