Gulf-Arabic WhatsApp auto-reply in n8n: canned answers first, Gemini second, staff handoff for orders (free template)

I run a small automation studio (imdifferent01) and most of the businesses I talk to in the Gulf get their customer messages on WhatsApp, in Gulf Arabic. English-first templates didn’t fit, so I built a set of Arabic-first workflows. This post covers the restaurant WhatsApp replier, which is free.

What it does

  1. WhatsApp Verify (GET): answers Meta’s webhook verification (200 + challenge, 403 on a bad token).
  2. WhatsApp Webhook → Ack Meta (200) right away, so Meta doesn’t retry.
  3. Parse Message → Classify Intent (a Code node with Arabic + English keywords): menu, hours, location, order/delivery/table booking.
  4. Order, delivery or booking → Build Staff Alert → Notify Staff, and the customer gets a handoff reply. The AI never takes orders.
  5. Menu / hours / location → canned Arabic reply from a single Settings node.
  6. Anything else → Gemini Reply, told to answer only from the Settings info. If Gemini fails (404, 429, or any finishReason other than STOP) the customer gets a polite fallback instead of a cut-off answer.

All texts, opening hours, and the menu link live in one Settings (Set) node, so you edit the replies without touching code. Arabic step-by-step sticky notes are inside the workflow. No keys are included; you add your own credentials.

Example output (real Gemini call, WhatsApp pointed at a local mock)

Customer: عندكم مواقف سيارات؟ (“do you have parking?”)
Reply sent: هلا بك يا الغالي في مطعم الريم! موقعنا في دبي، الكرامة، شارع 10ب جنب محطة المترو، وبالنسبة للمواقف ما عندي فكرة أكيدة بس…
(It gave the location from Settings and said it didn’t know about parking instead of inventing an answer.)

Two things I hit that might save you time

  • On a thinking model, thinking tokens ate maxOutputTokens (191 of 200) and replies came back cut off with finishReason: MAX_TOKENS. Fix: treat anything other than STOP as a failure, and either set thinkingBudget: 0 or use a lite model. The template defaults to gemini-3.5-flash-lite.
  • The Gemini free tier has a small daily cap per model; I hit 429 during testing. The fallback branch caught it, but plan for billing in production.

How it was tested (honestly)

  • n8n 1.123.85 self-hosted: imports cleanly; Code-node logic covered by unit tests.
  • WhatsApp: tested against a local mock of the Meta Graph API, not a live WhatsApp number yet.
  • AI: tested live against the real Gemini API.
  • Not tested on n8n Cloud.

Free download (this workflow + a leads → Google Sheets workflow with an instant Arabic reply; the Google nodes are logic-tested only, not yet with a live Google account):
مجاناً: أتمتة واتساب بالعربي + تسجيل العملاء في Google Sheets | Free Arabic WhatsApp Auto-Reply + Leads-to-Sheets (n8n) (set the price to $0)

The workflow JSON is inside the free download above.

If you want the other six (clinic replier with medical handoff, bookings to Google Calendar, AR↔EN translator, daily sales summary, 24h reminders, review requests), the full pack is here: باقة n8n بالعربي لأعمال الخليج: 8 أتمتة جاهزة مع شرح عربي | Arabic-First n8n Pack for Gulf Businesses (8 Workflows)

Happy to answer questions about the intent classifier or the Gemini fallback.