How to answer WhatsApp customer questions with an AI agent and hand off to humans (n8n)
The problem
Customers message on WhatsApp at all hours with the same questions, but a bot that guesses wrong can do more harm than no reply at all.
Tools needed
- n8n
- WhatsApp Business API
- OpenAI
- Telegram (for the human team)
- Your knowledge base
Step-by-step recipe
- Trigger an n8n workflow on every incoming WhatsApp message.
- Load the conversation history and the relevant knowledge-base content.
- Have OpenAI draft a reply based only on that content, and run a confidence check on it.
- If the answer is confident, send it back on WhatsApp.
- If not, forward the case to your team's Telegram chat with the full conversation attached so a person can take over.
Copyable prompt
You answer WhatsApp messages for [BUSINESS]. Use only the knowledge base below. Reply in the customer's language in at most 3 short sentences.
Then, on a new line, write CONFIDENCE: high or CONFIDENCE: low. Use low if the answer is not clearly in the knowledge base, the customer seems upset, or the topic is [refunds / complaints / legal].
Conversation so far: {{history}}
Knowledge base: {{kb}}
New message: {{message}}Original template written by AgentRecipes, not copied from the source. Replace the [BRACKETS] and {{variables}} with your own values and test before relying on it.
What the builder reported
The repository describes the architecture and its goals (cover routine questions, give round-the-clock coverage, keep humans on unclear cases). It reports no measured results, and the exported workflow was still to be added.
These are the source author's own claims. AgentRecipes has not tested or verified them.
Watch out for
- The source does not say how confidence is scored, so you have to design and test that check yourself.
- Start with a small, accurate knowledge base; the agent can only be as good as its content.
Source
Original write-up: GitHub (2026-07-01) ↗
Found via Agent Use Cases: “Answer WhatsApp customer questions and escalate to humans”. This recipe summarises the source in our own words; read the original for the full details. Link last checked 2026-10-15.
More customer support recipes
New agent recipes in your inbox
A short email with the newest automation recipes, each linked to its real-world source. No spam, unsubscribe anytime.