Introduction
Imagine running a busy Kirana store. Customers constantly ping you on WhatsApp for daily essentials like milk, sugar, or snacks. Handling these requests manually can get overwhelming, especially when you’re also managing the store.
That’s when automation comes in. Using n8n, I built a WhatsApp chatbot that:
Understands what customers want (via AI)
Records the order automatically
Sends back a confirmation message instantly
This blog will walk you through the tools, components, workflow, and real-life example of how I made this possible.
1️⃣ n8n – The Automation Engine
What it is: n8n is an open-source workflow automation platform, similar to Zapier, but much more flexible.
Why I used it:
Visual, drag-and-drop workflow builder.
Integrates with hundreds of apps & APIs.
Lets me connect WhatsApp, AI, and Google Sheets in one place.
Role in my project: Acts as the central brain. It receives WhatsApp messages, triggers AI analysis, logs data in Sheets, and sends replies.
3️⃣ Gemini AI – The Smart Assistant
4️⃣ Google Sheets – Order Management
5️⃣ Sample Store Inventory – The Data Reference
What it is: A mock product catalog (Sugar, Rice, Oil, Milk, Maggi, Biscuits).
Why I used it:
Role in my project: Provides the product list for order validation and FAQs like “Do you have Maggi?”
How It Works (Workflow Overview)
Here’s the big picture flow:
Customer → WhatsApp:
Message like: “I want 1 litre milk and 2 packets of Maggi.”
Meta WhatsApp Cloud API:
Forwards message to n8n webhook.
n8n Workflow Trigger:
Starts automation once a new message arrives.
Gemini AI Node:
- Classifies intent (Order / FAQ).
Google Sheets Node:
Appends data into sheet:
Customer number
Order items
Date & Time
Status = Confirmed
WhatsApp Reply Node:
Sends confirmation:
“✅ Order confirmed: 1L Milk, 2 Packets Maggi. Delivery in 30 mins.”
(Insert Workflow Diagram Image: Webhook → Gemini → Sheets → WhatsApp Send)
Step-by-Step Setup
Step 1: Connect WhatsApp Cloud API
Register on Meta for Developers.
Create an app → Enable WhatsApp.
Generate Access Tok****en & Phone Number I****D.
Add n8n webhook URL under “Callback URL”.
Step 2: Build n8n Workflow
Webhook Node: Captures messages from WhatsApp.
Gemini Node: Analyzes text.
Google She****ets Node: Stores structured order.
WhatsApp Sen****d Node: Sends back confirmation.
Step 3: Setup Google Sheets
Columns:
| Order ID | Customer Number | Item | Quantity | Date | Status |
Sample prompt:
"You are a chatbot for a Kirana store. If the message is an order, extract items and quantity in JSON. If it’s a question, respond with store info (timing: 8 AM – 10 PM)."
Example Run
{
"order": [
{"item": "Rice", "quantity": "2kg"},
{"item": "Oil", "quantity": "1 Litre"}
],
"intent": "order"
}
🌟 Benefits of This Setup
✅ Customers get instant replies
✅ Store owners save time and avoid mistakes
✅ Easy to scale – just add more nodes
✅ Affordable – uses free tools (Sheets + n8n self-hosted)
🚀 Future Upgrades
Integrate payment collection (UPI, Stripe, Razorpay).
Add stock availability check from Google Sheets.
Create a dashboard with order analytics.
Add multi-language support (Marathi, Hindi, English).
🎯 Conclusion
This project proves how even small businesses can become AI-powered with simple, free, and open-source tools.
By connecting WhatsApp + n8n + Gemini + Google Sheets, you can automate orders, answer FAQs, and focus more on running your store instead of replying to messages all day.