Learn Build Community Opportunities Hosted n8n Blog About Careers Contact Log in

Home / Blog / Explainer

Explainer

Take Food Orders Through a WhatsApp Bot Built in n8n

An Arena brief about a Calabar restaurant losing money to mistyped WhatsApp orders, and how to build an n8n bot that customers and staff can both trust.

This Arena brief asks builders to take food orders through a WhatsApp menu bot built in n8n for a small restaurant in Calabar. The bot reads free-text orders, turns them into menu items with correct totals, sends a clean ticket to the kitchen, and hands messy orders to a person instead of guessing.

The business behind the brief

The brief's restaurant, Mama Nne Eats, is an Arena scenario: a popular small restaurant that takes 60 to 120 orders a week on one WhatsApp Business number, mostly in English with some pidgin. Staff read each message, look up prices, add up totals and message the kitchen.

The brief puts numbers on what that costs. Six to ten orders a week come out wrong. Each one takes 20 to 45 minutes on the phone to fix and costs roughly ₦1,500 to ₦4,000 in wasted food and lost table turnover. Staff spend about 10 hours a week typing and checking prices, and some customers give up while waiting for a confirmation. None of this is unusual. It is what happens when a growing restaurant's order system is one busy phone.

What the automation has to do

  • Receive WhatsApp messages through GreenAPI and ignore repeats of the same message.
  • Show the menu when asked and parse free-text orders such as "2 jollof rice and 1 small egusi, deliver to Etta Agbor, COD" into items and quantities.
  • Price the order from the menu sheet, not from the AI, and add tax and delivery.
  • Log the order, offer a payment link or cash on delivery, and send a formatted ticket to the kitchen.
  • Escalate to staff for approval or editing when the order is unclear, out of the delivery area, or the AI is not confident.

How to approach the build

  1. Normalise the incoming message first. GreenAPI webhooks come in a few shapes, for example plain text and extended text messages. A Code node that always outputs the same fields (sender phone, name, text, message ID, timestamp) saves every later node from checking for missing values.
  2. Deduplicate by message ID. Look up the message ID in the Logs tab before doing anything. If it is there, stop. Webhooks can be delivered more than once, and a duplicated order is a duplicated meal.
  3. Let the AI read, not count. Ask OpenAI, at temperature 0 with a structured output schema, to return item names, quantities, modifiers, delivery details, payment preference and a confidence value. Do not ask it for prices or totals.
  4. Price in code, from the menu. Match each parsed item to the Menu tab and compute subtotal, tax, delivery fee and total in a Code node. An item that does not match the menu is a reason to escalate, not to guess.
  5. Branch on confidence and completeness. An If node sends complete, confident orders to confirmation and the kitchen. Anything else, such as "I want food now" or a delivery to Lagos, goes to a staff escalation with Approve and Edit options.
  6. Confirm and log every outbound message. The customer gets an itemised summary and the payment option. Every message in both directions is written to Logs, which is how staff answer "did the customer confirm?" later.

The hard parts

Deterministic AI

The brief stresses that staff must be able to trust the totals. That comes from the split of responsibilities above: the model only translates language into structure, and everything with a price is calculated from the sheet. Temperature 0 and a strict schema make the parsing repeatable; code makes the money exact.

Modifiers and pidgin

"No pepper in one" and "add suya stick" are where simple parsers fail. Give the model the menu in the prompt, ask it to attach modifiers to the item they belong to, and return anything it cannot place as an unmatched note. Unmatched notes are a trigger for staff review, which is fine. The aim is not to automate every order. It is to stop the wrong ones.

Knowing when to hand over

An escalation path is not a failure of the bot; it is the feature that makes it safe to switch on. The brief's test messages deliberately include an out-of-area delivery and a vague request, so graders can see the bot step aside correctly.

What our graders look for

  • Intake, parsing, dedupe, price validation and kitchen handoff (30%): the core path works end to end.
  • OpenAI structured parsing (20%): deterministic settings and a schema, visible in the configuration.
  • Google Sheets records and notes (20%): orders, kitchen tickets and logs written correctly.
  • Staff escalation and approval (15%): unclear orders reach a person, who can approve or edit them.
  • Customer confirmation and outbound logging (15%): the customer always knows where their order stands.

Pricing and pitching this job

The brief values this at $250 to $600 fixed. A restaurant owner will understand the pitch in their own numbers: fewer wrong orders, less food thrown away, staff back on the floor instead of on the phone, and customers who get a confirmation in seconds. Demonstrate it with the four test messages from the brief, including the two that the bot correctly refuses to handle alone.

New Arena briefs drop every Monday in the app at app.automatenaija.com, and every Beginner brief is free, so pick one and build it this week.

Frequently asked questions

Can a WhatsApp bot really understand free-text food orders?

Yes, for most orders, when an AI model is given the menu and asked to return structured items and quantities at temperature 0. It will still meet orders it cannot place, such as vague requests or unusual modifiers. A good build returns those as unmatched notes with low confidence and hands them to staff instead of guessing.

Why should the AI not calculate the order total?

Language models are good at reading and bad at guaranteed arithmetic, and a wrong total costs real money and trust. Let the model identify items and quantities, then look up each price in your menu sheet and add everything up in a Code node. The total is then exact and always matches the menu.

What do I need to connect WhatsApp to n8n?

This brief uses GreenAPI, which links a WhatsApp number to an instance and sends incoming messages to your n8n webhook. You reply by calling GreenAPI's send message endpoint from an HTTP Request node. Businesses with higher volumes often move to the official WhatsApp Business Platform later, and the workflow design stays largely the same.

How does the staff approval step work?

When an order is unclear or the AI is unsure, the workflow writes it to an escalation record and notifies staff, for example by email with Approve and Edit links that call a second n8n webhook. Approving sends the confirmation to the customer and the ticket to the kitchen; editing lets staff correct the items first.


Build it with us. The community is free and the build track teaches this kind of automation week by week: see pricing or join the community.

Comments

Questions, corrections and your own experience are welcome. Comments are posted by members in the Automate Naija community and moderated there.

Loading comments...

Add a comment

Keep reading

More guides on building, fixing and shipping automations with n8n, Make and Zapier.