How to build a WhatsApp AI agent with n8n and Claude in 10 steps
An AI agent that answers your customers on WhatsApp within seconds, 24/7, using only your business's information. No coding. One prompt to Claude builds the whole workflow.
7 min readSetup time: about an hour
How it works
- A customer sends a message
- Meta passes it on
- n8n receives it
- Claude writes a reply
The reply goes back to the customer
What you need
- A Facebook accountFor Meta, free
- A phone number for the botIdeally a number that isn't active on WhatsApp
- n8nCloud, or a server with an https address
- Claude + an Anthropic API key
The roadmap
Part 1Connect WhatsApp25 minutes
It all happens at Meta. You don't need outside sites that sell "WhatsApp API" access.
Open a business portfolio
business.facebook.com → create a Business Portfolio → fill in your business details. Already have one for ads? Use it.
Create a developer app
developers.facebook.com → My Apps → Create app → choose the WhatsApp option → connect it to the portfolio from step 1.
Send a test message
In the app: WhatsApp → API Setup. Add your own phone under "To" and click Send message. Got a "Hello World" message? The API works.
Connect your real number
Add phone number → display name (like your business name) → verify with an SMS code.
Collect your access details
Keep them somewhere private (not in a chat, not in a screenshot):
- Phone Number ID + WhatsApp Business Account ID
- On the API Setup page
- App ID + App Secret
- In App settings → Basic
- A permanent token
- Explained below
Part 2Claude builds the bot20 minutes
Connect n8n to Claude
MCP is an "adapter" that lets Claude work inside n8n.
- In n8nSettings → MCP access → turn it on and copy the address.
- In ClaudeSettings → Connectors → Add custom connector → paste it.
- CheckAsk Claude "What n8n tools do you have?"
Fill in and send the prompt
Fill in the square brackets and send it to Claude. The agent will answer customers in their own language.
Build a WhatsApp AI auto-reply workflow in my n8n instance, using my n8n MCP connection.
FLOW
1. WhatsApp Trigger, "messages" updates only.
2. Ignore status updates (sent / delivered / read) so it never loops.
3. Extract the customer's phone number and message text.
4. If the message is not text, reply: "Thanks for your message! Right now I can only read text. Could you type your question?"
5. AI Agent node + Anthropic Chat Model, with the business info and rules below as the system message.
6. Memory per customer phone number, last 10 messages.
7. Send the reply with the WhatsApp Business Cloud node, using my Phone Number ID.
BUSINESS INFO
- Business name: [business name]
- What we do: [a sentence or two]
- Products / services: [list]
- Pricing: [prices, or "don't share prices, offer a call instead"]
- Hours: [days and hours]
- Location: [address or area]
- Website: [link]
- Policies: [shipping, returns, cancellations]
- How to book / buy: [link or phone]
- Reply in the customer's language.
RULES
- Use only the info above. Never invent prices, policies or promises.
- 1-3 short sentences, like a person on WhatsApp. At most one emoji.
- Not sure? Say a teammate will get back to them.
- Never claim you did something you can't do (booked, refunded, sent a file).
- If the customer asks for a human or is upset, say a teammate will reply soon.
BUILD
- Reuse my existing n8n workflows and credentials where possible.
- If you can't create workflows through MCP, give me the full workflow JSON to paste.
- Use n8n credentials only. Never put keys or tokens in nodes or code.
- Name it "WhatsApp AI Agent" and leave it inactive.
When done, explain in simple English: what you built, which credentials to add, where to paste each one, and how to test.Add your business info
The agent is only as good as the information you give it. Every empty field is a place where the AI starts guessing. Don't want to share prices? Say so explicitly.
Add keys in n8n
Claude never sees your keys. You add them in n8n → Credentials → Create credential:
- WhatsApp OAuth APIApp ID + App Secret
- WhatsApp APIThe permanent token + Business Account ID
- AnthropicAn API key from console.anthropic.com
Then pick the right key in each node and turn the workflow on.
Part 3Test and go live5 minutes
Test it
Message the bot from your personal phone: "Hi, what services do you offer?" and check in n8n → Executions that everything ran.
Try to break it
0/5Every bad answer = missing info or a missing rule. Add it and test again.
Something not working?
You send a message and nothing happens
Is the workflow active? Is n8n on an https address? Is there only one active WhatsApp trigger?
It worked yesterday and not today
A temporary 24-hour token. Switch to a permanent token (step 5).
"Recipient phone number not in allowed list"
The test number only sends to numbers you added under "To".
The bot replies to itself, or twice
The status-update filter after the trigger is missing.
Long or made-up answers
Add "max 2 sentences" and fill in the missing info.
Want us to do it for you or learn to do it yourself?
Want us to build it for your business?
We set up Meta, the number and the API, build the agent, write its info and rules, and test it with you. It can also connect to a CRM, a calendar or Google Sheets.
Talk to us on WhatsAppPrefer to do it yourself?
A private one-on-one Zoom lesson. In one hour we'll build it together on your own accounts, step by step. Includes WhatsApp support after the lesson.
Book a Zoom lesson


