How to Set Up n8n WhatsApp Business Cloud API: Step-by-Step
ChatAgent
August 2, 2026
Customer expectations keep rising. People want instant replies. Businesses struggle to keep up with the volume of messages. WhatsApp has over 2 billion active users. It is the most popular messaging app globally. But sending messages manually takes too much time. Scaling manual communication is impossible.
You need automation. n8n is a powerful workflow automation tool. Combining n8n with the WhatsApp Business Cloud API solves this problem. ChatAgent is building a dedicated n8n node to make this integration seamless. You can connect WhatsApp to your entire tech stack.
This article explains how to set up the n8n WhatsApp Business Cloud API step-by-step. You will learn the prerequisites, the exact setup process, and real-world use cases.
What is the WhatsApp Business Cloud API?
Meta launched the Cloud API in 2022. It replaced the need for local servers. You no longer need to host your own database. You do not need third-party Business Solution Providers (BSPs) to route your messages.
The Cloud API hosts the infrastructure directly on Meta's servers. This gives you direct access to WhatsApp. It means faster message delivery. It also reduces latency. Setup takes minutes instead of weeks.
You use the Cloud API to send and receive messages programmatically. You can send text, media, documents, and interactive templates. It is the backbone of modern WhatsApp automation.
Why Use n8n for WhatsApp Automation?
n8n is an open-source workflow builder. You can self-host it. This gives you full control over your data and security. You do not send customer data to third-party cloud services if you do not want to.
With n8n, you connect WhatsApp to your CRM, database, or email tool. You build custom logic visually. You drag and drop nodes to create workflows. You do not need to write complex code.
n8n supports webhooks and HTTP requests natively. This makes it perfect for integrating with the WhatsApp Cloud API. ChatAgent is enhancing this experience. We are building a custom n8n node. This node will remove the need for manual HTTP requests. You will just select your options, and the node handles the API calls.
Prerequisites for Setup
Before you start, you need a few things. Make sure you have these ready.
1. A Meta Developer Account
You must register as a Meta developer. Go to the Meta Developer portal. Sign up using your existing Facebook account. Complete your developer profile.
2. A WhatsApp Business Account
You need a WhatsApp Business Account (WABA). Meta creates a test WABA for you during the app creation process. You can upgrade this to a live account later. You also need a phone number that is not currently registered with standard WhatsApp or WhatsApp Business app.
3. An n8n Instance
You need n8n running. You can use n8n Cloud, or you can self-host n8n using Docker. Ensure your n8n instance is accessible from the internet if you want to receive inbound messages via webhooks.
Step-by-Step Guide to Setting Up the WhatsApp Business Cloud API
Follow these steps to connect your WhatsApp account to n8n.
Step 1: Create a Meta App
Log in to your Meta Developer account. Click "My Apps" in the top right corner. Click "Create App".
Choose "Business" as the app type. Give your app a name. Link it to your business portfolio. Click "Create App". Meta takes a few seconds to generate your app dashboard.
Step 2: Add the WhatsApp Product
Look at your app dashboard. Find the "Add Product" section. Scroll down to WhatsApp. Click "Set Up".
Select your business portfolio. Meta assigns a test phone number to your app. It also generates a temporary access token. You will use this token in n8n. Meta also provides a test recipient phone number. You can only send messages to this number until your app is approved for live use.
Step 3: Get Your Access Token and Phone Number ID
You need two critical pieces of information for n8n.
- Access Token: Find this on the WhatsApp dashboard. The token starts with "EAAG...". Copy it. This token lasts 24 hours in test mode. For production, you must generate a permanent token via System Users in your Meta Business Manager.
- Phone Number ID: Find this below the access token. It is a long numeric string. Copy this ID.
Step 4: Configure the Webhook (Optional for Receiving Messages)
If you only want to send messages, skip this step. If you want n8n to react to incoming WhatsApp messages, you need a webhook.
Go to the "Webhooks" field on your WhatsApp dashboard. Click "Configure". Meta requires a callback URL and a verify token.
Go to your n8n instance. Create a new workflow. Add a "Webhook" trigger node. Set the HTTP method to POST. Copy the "Production URL" from the node.
Go back to Meta. Paste this URL in the "Callback URL" field. Create a random string for the "Verify Token" field. For example, type "my_n8n_verify_token".
Wait. Meta will try to verify the webhook. n8n needs to respond to Meta's verification challenge. To do this, add an "HTTP Respond" node in n8n. Or, use the "Webhook" node's built-in response setting. Set the response body to the query parameter hub.challenge.
Once Meta verifies the URL, subscribe to webhook fields. Check "messages". Now, when someone messages your WhatsApp number, Meta sends the data to this n8n webhook.
Step 5: Send a Test Message from n8n
Let's send your first message. Open your n8n workflow. Add an "HTTP Request" node. Connect it to your trigger node (or trigger it manually).
Configure the HTTP Request node:
- Method: POST
- URL:
https://graph.facebook.com/v18.0/YOUR_PHONE_NUMBER_ID/messages(Replace with your actual Phone Number ID). - Authentication: Generic Credential Type -> Header Auth
- Name:
Authorization - Value:
Bearer YOUR_ACCESS_TOKEN
Set the "Send Body" option to true. Select JSON as the body content type. Paste the following JSON payload:
{
"messaging_product": "whatsapp",
"to": "RECIPIENT_PHONE_NUMBER",
"type": "text",
"text": {
"body": "Hello from n8n! This is a test message."
}
}
Replace "RECIPIENT_PHONE_NUMBER" with your test phone number. Include the country code without any plus signs or spaces. For example: 15551234567.
Execute the node. Check your phone. You should receive a WhatsApp message. You just integrated n8n with the WhatsApp Cloud API.
When ChatAgent releases our custom n8n node, this process gets much simpler. You will not need to handle HTTP requests or header authentication. You will just paste your token and type your message.
Understanding WhatsApp Message Templates
You cannot send arbitrary text messages to new users freely. WhatsApp has strict anti-spam rules. You must use Message Templates for the first message you send to a user.
You create these templates in the Meta Business Manager. Meta reviews and approves them. A template might look like this: Your order {{1}} has shipped. It will arrive on {{2}}.
In n8n, you call this template using the API. You pass the variables {{1}} and {{2}} in your JSON payload. Once the user replies, you enter a 24-hour customer service window. During this window, you can send free text messages without templates.
Real-World Examples of n8n WhatsApp Automation
Businesses use n8n and WhatsApp to automate critical paths. Here are three real examples.
Example 1: E-commerce Order Confirmations
An online store wants to reduce customer support tickets. Customers constantly ask about order status.
The store connects Shopify to n8n. When a new order hits Shopify, n8n triggers. n8n extracts the customer's phone number and order details. n8n sends a WhatsApp message using the Cloud API.
The message says: "Hi John, we received your order #1234. We are preparing it for shipment."
When the shipping provider updates the tracking status, a webhook hits n8n. n8n sends another WhatsApp message. "Your order #1234 just shipped. Track it here: [link]."
This automation reduced order status support tickets by 65% for the business. Customers get instant updates on the app they check most often.
Example 2: Appointment Reminders
A dental clinic struggles with no-shows. Missed appointments cost them thousands of dollars monthly.
They connect their Calendly to n8n. When a patient books an appointment, n8n logs it in Google Sheets. Twenty-four hours before the appointment, n8n checks the Google Sheet. It sends a WhatsApp reminder.
"Reminder: You have an appointment with Dr. Smith tomorrow at 10:00 AM. Reply 1 to confirm or 2 to reschedule."
If the patient replies "2", n8n catches the webhook. n8n sends a Calendly link to pick a new time. This reduced clinic no-shows by 40%. WhatsApp reminders have a 98% open rate, compared to 20% for emails.
Example 3: Lead Capture and Follow-up
A marketing agency runs Facebook lead ads. They want to contact leads immediately.
Facebook sends lead data to n8n via webhook. n8n immediately sends a WhatsApp message to the lead.
"Hi Sarah, I saw you just requested our marketing guide. Here is the link: [link]. Do you have time for a quick chat tomorrow?"
The lead is still at their phone when the message arrives. They respond instantly. n8n routes the response to the sales team in Slack. The sales team calls the lead within 5 minutes. This rapid follow-up increased lead conversion rates by 35%.
Measuring the Impact: Data and Results
WhatsApp automation is not just a fancy tech trick. It drives real business results.
Data shows that WhatsApp messages have a 98% open rate. SMS sits at 22%. Email open rates hover around 20%. People open WhatsApp messages within three minutes of receipt.
Businesses that switch to automated WhatsApp notifications see response times drop by 60%. Customers feel heard. When you use n8n to route inbound WhatsApp messages directly into your CRM, your team works faster. They do not switch between five different tabs.
Cost is another factor. The WhatsApp Cloud API charges per conversation. Marketing and utility conversations cost a few cents. Compare this to the cost of human labor to send the same messages manually. The ROI of automation is massive. You pay cents per message and save hours of human time.
FAQ
1. Is the WhatsApp Business Cloud API free?
Meta gives you 1,000 free conversations per month. This applies to user-initiated conversations. After that, you pay per conversation. The cost depends on your country and the type of conversation (marketing, utility, authentication). Meta bills you directly. n8n is free if you self-host it, but ChatAgent and n8n Cloud have their own pricing.
2. Can I use my personal WhatsApp number with n8n?
No. You cannot use a standard personal or WhatsApp Business app number with the API. You must use a dedicated number. This number cannot be registered on any mobile device's WhatsApp app. You can port your existing business number to the API if you want, but you must delete the app registration first.
3. How does ChatAgent improve this setup?
ChatAgent builds dedicated nodes for n8n. Our WhatsApp node removes the need for manual HTTP requests. You do not need to read API docs. You just drag our node into n8n, connect your Meta credentials, and select your template. We handle the JSON payloads and authentication for you. This saves time and prevents errors.
4. What is the difference between Cloud API and the legacy WhatsApp Business API?
The legacy API required you to use third-party providers or host your own client on a server. It was slow and expensive. The Cloud API runs entirely on Meta's servers. It is faster, easier to set up, and costs less. Meta is pushing all new users to the Cloud API.
Get Started with ChatAgent
Setting up WhatsApp automation with n8n transforms how you talk to customers. You reply instantly. You reduce manual work. You close more deals.
ChatAgent makes this even easier. We build custom n8n nodes to connect your favorite tools without code. Our platform handles the heavy lifting.
Ready to upgrade your workflows? Explore our full list of available integrations at /integrations/. Find out how ChatAgent connects n8n to your entire software stack.
Want to scale your automation? Check out our flexible plans at /pricing/. Start building smarter workflows today.
Related Articles
Try ChatAgent
Turn WhatsApp Chats Into Repeat Orders
ChatAgent gives you a WhatsApp storefront and automation engine so every conversation becomes a reorder, not a one-off sale.