Send AI-parsed restaurant orders and status updates via Telegram and Google Sheets
Go to WorkflowDescription
๐ AI-Powered Restaurant Order & Notification System
A Complete n8n Workflow for Automated Ordering and Customer Updates
This professional n8n workflow provides an end-to-end solution for small restaurants. It includes a Telegram Customer Bot for placing orders and an Automated Notification System that updates customers via Google Sheets.
๐ Description
This system eliminates the need for manual order taking and status updates. It features:
AI Order Bot: Customers chat with a Telegram bot to view the menu and place orders. An AI agent (Claude Haiku) parses natural language (e.g., "2 pizza + 1 coke") into structured data.
Order Management: Orders are saved automatically to Google Sheets for staff to manage.
Real-Time Notifications: As staff change the status in the sheet (e.g., to Preparing or Ready), n8n instantly notifies the customer via Telegram.
Key Bot Commands
| Command | Description |
| :--- | :--- |
| /start | Welcome message and instructions |
| /menu | View today's food and drink offerings |
| /help | See all available commands |
| STATUS [Queue #] | Check the live status of an order |
| CANCEL [Queue #] | Cancel an order (only if Pending) |
| /myorders | View your last 5 orders |
๐ Setup Requirements
1. Google Sheets Configuration
Your spreadsheet acts as your Admin Dashboard. Ensure Row 1 has these exact headers in order:
| Column | Header Name | Description |
| :---: | :--- | :--- |
| A | Queue Number | Auto-generated by the bot (e.g., #4582) |
| B | Chat ID | Customer's Telegram ID โ captured automatically |
| C | Name | Customer's first name |
| D | Order | Items ordered โ parsed and cleaned by AI |
| E | Status | Dropdown: Pending, Preparing, Ready, Completed, Cancelled |
| F | Order Time | Timestamp of when the order was placed |
| G | Order Date | Date of the order |
| H | Last Status Sent | Internal: Tracks last notification sent to prevent duplicates |
> โ ๏ธ Important: Set up a Data Validation dropdown on column E with the values: Pending, Preparing, Ready, Completed, Cancelled. This is how staff update order status.
> โ ๏ธ Important: In the Read All Rows node, go to Options โ Output Row Number and ensure it is enabled. The workflow uses row_number to write back to the correct cell.
2. n8n Credential Configuration
You need 3 credentials set up in n8n before activating:
| Credential Type | Where Used | Notes |
| :--- | :--- | :--- |
| Anthropic API | Claude Haiku node | Required for AI order parsing |
| Google Sheets OAuth2 API | All Google Sheets nodes | Connect your Google account |
| Telegram Bot API | All Telegram nodes | Use your bot token from @BotFather |
Steps:
Go to n8n โ Settings โ Credentials โ Add Credential
Add each credential type above
After importing the workflow, open each node and select the correct credential
3. Workflow Import Steps
Copy the workflow JSON
In n8n, click + โ Import from JSON โ Paste and confirm
Connect all credentials in each node
Ensure Output Row Number is enabled in Read All Rows node options
Pre-fill column H (Last Status Sent) with the current Status for all existing rows to prevent old rows from firing notifications on first run
Turn the workflow Active
๐ How It Works
Phase 1: The Customer Bot (Workflow 1)
Customer texts bot
โ
Route Message โ detects command type
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ /start โ Welcome message โ
โ /help โ Help guide โ
โ /menu โ Today's menu โ
โ /myorders โ Last 5 orders โ
โ STATUS โ Live order status โ
โ CANCEL โ Cancel if Pending only โ
โ [order] โ AI parses โ saves โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
Order saved to Google Sheet (Status = Pending)
Customer receives queue number + wait time
Phase 2: The Staff Notification System (Workflow 2)
Every 1 minute โ Schedule Trigger fires
โ
Read ALL rows from Google Sheet
โ
For EACH row independently (runOnceForEachItem):
Skip if no Queue Number or Chat ID
Skip if Status = Pending
Skip if Status = Last Status Sent (already notified)
โ
Send notification if Status changed
โ
Send Telegram message to that customer only
โ
Write new Status into column H (Last Status Sent)
โ Prevents duplicate notification next minute
Status Flow & Customer Messages
| Staff sets Status to | Customer receives |
| :--- | :--- |
| Preparing | ๐จโ๐ณ "Your order is being Prepared! We'll notify you when it's ready." |
| Ready | ๐ "Your order is READY for collection! Please collect from the counter." |
| Completed | โ
"Order marked as Completed. Thank you for dining with us!" |
| Cancelled | โ "Your order has been Cancelled. We apologise for the inconvenience." |
๐ Order Cancellation Rules
Customers can only cancel orders in Pending status. All other states are protected:
| Current Status | Customer tries CANCEL | Response |
| :--- | :--- | :--- |
| Pending | CANCEL 1234 | โ
Cancelled successfully |
| Preparing | CANCEL 1234 | โ ๏ธ Cannot cancel โ being prepared |
| Ready | CANCEL 1234 | โ ๏ธ Already ready โ please collect |
| Completed | CANCEL 1234 | โ ๏ธ Already completed |
| Cancelled | CANCEL 1234 | โ ๏ธ Already cancelled |
| Someone else's order | CANCEL 1234 | โ You can only cancel your own orders |
๐ฆ Required Credentials Summary
| Credential | Provider | Free Tier |
| :--- | :--- | :--- |
| Anthropic API | anthropic.com | Paid โ ~$5 minimum deposit |
| Google Sheets OAuth2 API | Google Cloud Console | Free |
| Google Sheets Trigger OAuth2 API | Google Cloud Console | Free |
| Telegram Bot API | @BotFather on Telegram | Free forever |
๐งช Test Scenarios
Run these in order to verify the full system:
/start โ Should receive welcome message
/menu โ Should see the menu with prices
Type 2 pizza + 1 coke โ Should get queue number
STATUS [queue] โ Should show โณ Pending
In sheet: change Status to Preparing โ Within 1 min, customer gets ๐จโ๐ณ message
In sheet: change Status to Ready โ Customer gets ๐ message
STATUS [queue] โ Should now show ๐ Ready
CANCEL [queue] โ Should say "already ready, please collect"
In sheet: change Status to Completed โ Customer gets โ
message
/myorders โ Should show order history with final status
โ ๏ธ Known Limitations
Notification delay:** Up to 1 minute between staff updating the sheet and customer receiving the message (due to polling interval)
Column H required:** The Last Status Sent column must exist in your sheet. Without it, every row will fire a notification on every poll
Anthropic API cost:** Claude Haiku is not free โ very low cost (~$0.25 per million tokens) but requires a funded account
Google Sheets trigger limitation:** The Google Sheets Trigger cannot detect which specific row changed, which is why a Schedule Trigger with row comparison is used instead
๐ File Structure
restaurant_WITH_STICKIES.json โ Complete workflow (W1 + W2) with sticky notes
restaurant_workflow_docs.md โ This documentation file
Built with n8n โข Claude Haiku AI โข Google Sheets โข Telegram Bot API