AI FAQ Auto-Responder for Incoming WhatsApp Messages
An n8n workflow that receives inbound WhatsApp messages through the Cloud API, answers common questions with Claude using your FAQ as context, and replies instantly — while quietly handing anything sensitive or unknown to a human agent, so customers get 24/7 answers without a bot embarrassing your brand.
- 1
Expose the WhatsApp webhook
Add a
Webhooknode (POST). In Meta for Developers, set the WhatsApp webhook callback URL to it and subscribe tomessages. Meta sends a GET verification first — return thehub.challenge(a second GET webhook handles this, per the notes). - 2
Extract the message
A
Codenode reads the payload atentry[0].changes[0].value.messages[0], pulling the sender's phone number and the text. It ignores status callbacks (delivered/read) so only real inbound messages continue. - 3
Draft a reply with Claude
An
HTTP Requestto Claude sends the message plus your FAQ and brand voice. Ask for strict JSON:replyandneeds_human. Instruct it to setneeds_humanfor refunds, complaints or anything off-FAQ, with a polite holding message as the reply. - 4
Branch: auto-send or escalate
An
IFnode onneeds_humanroutes the flow. False → send the AI reply. True → aSlacknode posts the conversation and customer number to your support channel so an agent takes over inside the 24-hour window. - 5
Send the WhatsApp reply
An
HTTP RequestPOSTs tohttps://graph.facebook.com/v19.0/YOUR_PHONE_NUMBER_ID/messageswith the recipient number and a text body, using your access token. The customer gets an instant, accurate answer any time of day.
Frequently asked questions
What do I need to use the WhatsApp Cloud API?
A Meta Business account, a WhatsApp Business phone number, and an app in Meta for Developers with the WhatsApp product added. You'll get a phone number ID and an access token, and you subscribe a webhook for incoming messages. It's free to receive and reply within the 24-hour customer service window.
How does it avoid answering things it shouldn't?
The Claude prompt includes your FAQ and a rule: if the question involves refunds, complaints, account changes or anything not in the FAQ, return a short holding reply and set `needs_human`. Those conversations route to Slack for an agent instead of auto-sending, so the bot never improvises on sensitive topics.
Can it reply outside the 24-hour window?
Free-form replies are only allowed within 24 hours of the customer's last message. Outside that you must use a pre-approved message template. This workflow handles the in-window case (the common one); for proactive or late replies, swap the send step for a template message.