Quick Overview
This workflow triggers on incoming WhatsApp orders, uses Groq to extract items and quantities, validates them against a live Google Sheets menu, logs the result to an orders sheet, and replies to the customer with either a clarification request or a priced confirmation (with optional VIP owner alerts).
How it works
- Triggers when a new WhatsApp message is received on your WhatsApp Business Cloud number.
- Sends the message text to Groq (Llama 3.3) to extract a structured list of ordered items and quantities.
- Reads the latest menu (item name, price, availability) from a Google Sheets “Menu” tab.
- Matches extracted items to the menu, checks availability, calculates line subtotals and the total price, and compiles any validation issues.
- If there are issues, replies to the customer on WhatsApp asking for a corrected order and appends a “needs_clarification” entry to the Google Sheets “Orders” tab.
- If the order is valid, appends a “confirmed” entry to the Google Sheets “Orders” tab and sends a WhatsApp confirmation with the item summary and total.
- If the confirmed total meets or exceeds the VIP threshold, sends a separate WhatsApp notification to the owner number.
Setup
- Connect WhatsApp Business Cloud API credentials for the WhatsApp trigger and the WhatsApp send steps.
- Add your Groq API credential and ensure the selected model is available in your Groq account.
- Connect Google Sheets OAuth and create a spreadsheet with a “Menu” tab (item_name, price, available) and an “Orders” tab (customer_phone, order_summary, total_price, status, notes).
- Update the configuration values for restaurant name, WhatsApp phone number ID, owner notification number, VIP threshold, and Google Sheet ID.
- Activate the workflow and send a test WhatsApp order to confirm messages are received and logged correctly.