Many small businesses already get their requests on WhatsApp: one customer asks about opening hours, another wants to know if you work on Saturdays, a third sends a photo of a leak. An AI agent can take the simple questions and hand you the rest. If the topic is new to you, start with what an AI agent is and what it is good for in a business.
This tutorial describes the setup I use: WhatsApp Business Platform (Meta's official access for businesses) connected to n8n, an automation tool. Meta's screens change often, so I re-read the official documentation on October 17, 2026, and I quote the menu names as they appear there.
In short. A Meta developer account and a business portfolio. A Meta app with the WhatsApp use case. An n8n instance reachable from the internet. A language model (here Claude, by Anthropic). Replies to your customers' messages within 24 hours are free on Meta's side; messages you start are charged per message.
What can an AI agent do on WhatsApp?
A WhatsApp AI agent is a program that reads the messages arriving on your business number, understands the request, looks up the right information in your sources (hours, services, service area) and writes a reply. It differs from a basic auto-reply: it doesn't send the same text every time, it answers the question asked.
A few realistic uses for a small business:
- Frequent questions: hours, drop-off address, usual lead times, payment methods.
- Intake: for a quote request, the agent asks for the type of job, the town, a photo, then sends you a summary.
- Triage: it spots an emergency or a complaint and flags it to you right away instead of answering it.
What it should not do alone: quote a firm price, accept an order, reply to an unhappy customer. Those stay with you.
What do you need before you start?
| Item | Where to get it | Note |
|---|---|---|
| Meta developer account | Register on Meta for Developers with a Facebook account or a managed Meta account | Free |
| Meta business portfolio | Created while you create the app if you don't have one | It is what "owns" the WhatsApp account |
| A phone number | A test number provided by Meta to start, then your real number | A number already used in the regular WhatsApp app follows specific rules: read Meta's phone numbers guide first |
| n8n | n8n Cloud or an install on your own server | Meta must be able to reach n8n over the internet |
| A language model | An API key from a provider (Anthropic, OpenAI…) | Billed by usage, separately from Meta |
| Your sources | A Google Sheet or document with hours, services, area | Often the longest part |
How do you set up WhatsApp on the Meta side?
All of these steps happen in the Meta App Dashboard. The labels below are the ones used on the "Get started" page of the WhatsApp Cloud API documentation.
- 01
Create the app
Click Create App, enter a name and your email, choose the Connect with customers through WhatsApp use case, then select or create your business portfolio. Confirm with Create app.
- 02
Connect a WhatsApp Business account
Click Start using the API, open API Setup, then pick an existing WhatsApp Business account or create one. Write down the account ID shown in that panel: n8n will need it.
- 03
Send a first test message
Click Generate access token, keep the test number in the From field, put your own mobile number in To, then Send message. You should get a message on your phone. Also write down the test phone number ID. This access token is temporary: the documentation says it expires quickly.
- 04
Create a permanent token
In your business portfolio settings, open System users, add a system user, then Assign Assets: your app with Manage app and your WhatsApp account with Manage WhatsApp Business accounts, both with full control. Then click Generate token with the
business_management,whatsapp_business_messagingandwhatsapp_business_managementpermissions. - 05
Prepare to go live
To leave test mode, you will add your real number (Meta's business phone numbers guide) and switch the app to Live mode. The n8n documentation notes that full verification goes through Meta's App Review.
Security. The permanent token lets anyone holding it write on behalf of your business. It goes into n8n's credentials and nowhere else: not in an email, not in a shared document.
How do you build the agent in n8n?
- 01
Create both credentials
n8n uses two kinds of WhatsApp credentials. To send: Access Token (the permanent token) and Business Account ID. To receive with the trigger: Client ID and Client Secret, which are the App ID and App Secret shown under App settings > Basic in your Meta app.
- 02
Add the WhatsApp Trigger
Choose the Messages event. Watch out: WhatsApp accepts only one webhook URL per app. If you switch from the test URL to the production URL, the new one replaces the old one, and only one of the two receives messages.
- 03
Filter what comes in
Add a node that only lets your customers' text messages through. The same feed carries other notifications, such as delivery statuses: without a filter, the agent would try to reply to them.
- 04
Plug in the AI agent
Add the AI Agent node. Under it, connect a model (for example Anthropic Chat Model), a Simple Memory whose session key is the sender's number, and at least one tool, which the documentation makes mandatory: for example reading the Google Sheet that holds your hours and services. In the agent's instructions, write what it may say and what it must pass on.
- 05
Send the reply
Finish with the WhatsApp Business Cloud node set to send a message, with your phone number ID as sender and the customer's number as recipient. The text sent is the agent's output.
- 06
Test from your phone
Message the test number from your mobile. Test a simple question, an off-topic question and an emergency before you activate the workflow.
Two useful settings. The Anthropic Chat Model node has a Prompt Caching option (5 minutes or 1 hour) so you don't pay full price for the instructions sent with every message. And Simple Memory does not work on an n8n install running in "queue mode" (several worker servers): in that case you need a memory stored in a database.
If you'd rather learn the agent logic without WhatsApp first, the tutorial on building an AI agent without code in n8n starts from a simple chat window.
Which safeguards should you put in place?
- Handover to a human. Plan a clear exit: as soon as the customer writes "urgent", complains or asks for a firm price, the agent replies that it is passing the message on, and n8n sends you an alert with a summary of the conversation.
- Business hours. Outside opening hours, the agent can answer simple questions, but it should say when a person will pick up the thread.
- Disclosing the AI. In the EU, the AI Act (Regulation (EU) 2024/1689, Article 50) requires telling people they are interacting with an AI system unless it is obvious. One sentence in the first message does it, and it is good practice everywhere.
- Scope. The agent answers only from your sources. If it can't find the answer, it says so and passes it on. It doesn't make up a lead time or a price.
- The log. Every exchange stays visible in n8n's executions. Read them every week at first: that is where you will see which instructions need fixing.
How much do WhatsApp API messages cost?
Since July 1, 2025, Meta charges per message rather than per conversation. Here is the principle as described in the official documentation:
| Message type | When | Charged? |
|---|---|---|
| Free-form reply (service) | Within 24 hours of the customer's last message | No |
| Utility template (confirmation, update) | Within that same 24-hour window | No |
| Utility, authentication or marketing template | Outside the window, or a message you start | Yes, by category, volume tier and the recipient's country code |
| All messages | 72 hours after a tap on a Click to WhatsApp ad or a Facebook Page button, from the mobile app, if you reply within 24 hours | No |
For an agent that answers your customers' messages, most traffic falls inside the free window. What you pay for is the language model (by usage, with its provider) and n8n. I broke that calculation down in how much an AI agent costs a small business.
I don't quote per-country rates here: Meta's rate table loads dynamically and I could not read it reliably. Rates are published per currency (16 of them, as CSV and PDF files) in the "Rate cards and volume tiers" section of the documentation's pricing page, with one row per market.
One thing to watch: since February 16, 2026, Meta has applied a separate pricing policy to AI providers (companies whose product is the AI itself). According to the official page, it does not change anything for other businesses. An agent serving your own customers falls under the general case, but read Meta's terms before launching an assistant open to anyone.
When is a WhatsApp agent not worth it?
- You get few messages. With five messages a day, the quick replies in the regular WhatsApp Business app are enough. The API setup takes time and upkeep.
- Your answers change every week and nobody will keep the sources up to date. An agent with stale information does more harm than no agent.
- The conversations are sensitive: health, legal matters, disputes. Data protection rules (GDPR in Europe) apply to messages, and a person should stay on the front line.
- You mainly want to send promotions. Those are marketing templates, charged per send and subject to Meta's rules. That is a different project from an answering agent.
If the setup feels like a lot to do alone, it is the kind of project I deliver as custom AI agents: Meta account, n8n workflow, instructions, safeguards and documentation. The simplest way to start: book a 30-minute call and we'll look at the messages you receive together.
Sources checked on October 17, 2026
- Meta, WhatsApp Cloud API: Get started
- Meta, Pricing on the WhatsApp Business Platform and pricing updates history
- Meta, AI Providers pricing policy
- n8n, WhatsApp Trigger node and WhatsApp Business Cloud credentials
- n8n, AI Agent node, Anthropic Chat Model and Simple Memory
- Regulation (EU) 2024/1689 on artificial intelligence
Frequently asked questions
Can I use the free WhatsApp Business app with n8n?
Not officially. n8n goes through WhatsApp Business Platform, Meta's API access. The regular WhatsApp Business app offers quick replies and away messages, but no connection to an AI agent.
Do the WhatsApp agent's replies cost money?
On Meta's side, free-form replies sent within 24 hours of the customer's last message are not charged. Template messages sent outside that window are. The language model and n8n are paid separately.
Do I need a new phone number for the WhatsApp agent?
Not necessarily. A number already used in the WhatsApp app follows specific rules, described in Meta's phone numbers guide. Read it first, or start with a dedicated number.
Should customers be told they are talking to an AI?
Yes. In the EU, the AI Act requires telling people they are interacting with an AI system unless it is obvious. One sentence in the agent's first message is enough, and it is good practice everywhere.
How long does it take to set up a WhatsApp AI agent?
The technical part takes a few days. What takes time is gathering reliable sources, writing the instructions and testing the hard cases. Moving from the test number to your real number also depends on Meta's checks.