Skip to content
Automations

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

  1. A customer sends a message
  2. Meta passes it on
  3. n8n receives it
  4. 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

Part 1Connect WhatsApp25 minutes

It all happens at Meta. You don't need outside sites that sell "WhatsApp API" access.

  1. Open a business portfolio

    business.facebook.com → create a Business Portfolio → fill in your business details. Already have one for ads? Use it.

  2. Create a developer app

    developers.facebook.com → My Apps → Create app → choose the WhatsApp option → connect it to the portfolio from step 1.

  3. 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.

  4. Connect your real number

    Add phone number → display name (like your business name) → verify with an SMS code.

  5. 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

ClaudeMCP = adaptern8n

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.

The prompt for Claude

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/5

Every 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 WhatsApp

Prefer 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
Talk to us on WhatsApp
Talk to us on WhatsApp