Build an AI Assistant on WhatsApp (Voice + Text) with n8n
· By AI Compare
Text, voice notes and images on WhatsApp, answered by an n8n AI agent, plus the Meta setup you need.
What you will build
The WhatsApp version of a personal AI assistant: send text, voice notes or images to a WhatsApp number, and an n8n AI agent replies. Voice notes are transcribed, images can be described, and the agent can use tools such as your calendar or documents.
It is based on the pattern used in n8n templates such as "WhatsApp AI agent that understands text, image and audio".
WhatsApp is harder than Telegram
Telegram gives you a bot in one minute. WhatsApp requires the WhatsApp Business Cloud API from Meta:
- A Meta developer account and a Meta app with the WhatsApp product added.
- A phone number registered for the WhatsApp Business Platform (Meta provides a free test number for development).
- A permanent access token (System User token in Meta Business Settings), the Phone Number ID and the WhatsApp Business Account ID.
- A webhook pointing at n8n.
Some templates use providers such as Twilio or 360dialog instead of Meta directly; they simplify setup but add a monthly fee per number.
Important limit
WhatsApp allows one webhook per Meta app. In n8n, that means you cannot listen with a test webhook and a production webhook at the same time. Deactivate the production workflow while testing, or use separate Meta apps for test and production.
Workflow structure
| # | Node | Purpose |
|---|---|---|
| 1 | WhatsApp Trigger (event: messages) | Receives incoming messages |
| 2 | IF: is a message (not a status update) | Ignore "sent/delivered/read" events |
| 3 | Switch: message type | text, audio, image |
| 4 | WhatsApp: Get media URL + HTTP Request download | Fetches the voice note or image as binary |
| 5 | OpenAI: Transcribe (audio branch) | Voice to text |
| 6 | OpenAI: Analyze image (image branch) | Describe the image or read text from it |
| 7 | Edit Fields (Set) | Combine into one prompt field |
| 8 | AI Agent + chat model + memory | Memory keyed by the sender's phone number |
| 9 | WhatsApp: Send message | Reply to the sender |
Rules you must follow
- 24-hour window: you can reply freely within 24 hours of the user's last message. Outside that window, WhatsApp only allows pre-approved message templates.
- Opt-in: only message people who contacted you or agreed to receive messages.
- Costs: Meta charges per conversation or message depending on category and country; check Meta's current pricing.
Personal vs business use
For a personal assistant, restrict the workflow to your own number with an IF node. For a customer-facing bot, see AI WhatsApp customer support agent.
Related
- Telegram AI assistant with n8n (easier setup)
- Connecting credentials in n8n

