Integrations

Automating WhatsApp in n8n: flows, webhooks and use cases

n8n solves almost everything, until you reach WhatsApp. The official connector wants template approval, a dedicated number and an onboarding that can take days, and your flow sits waiting. Here you plug WhatsApp into n8n in about 10 minutes using an unofficial, instance-based API: send with an HTTP Request node, receive by webhook and reply on autopilot. Real steps, plus the decisions worth making before you start.

Published on · Updated on · 8 min read

This article is also available in: Português · Español

Why put WhatsApp inside n8n

WhatsApp is the channel where most Brazilian customers actually reply. Bringing it into n8n means turning every incoming message into an automation trigger: qualify a lead, create a card in your CRM, fire a follow-up, notify a salesperson on Slack or log the conversation in a spreadsheet. Instead of someone copying and pasting information all day, the flow does it on its own.

The advantage of n8n is that it already ships with hundreds of ready-made integrations. Once WhatsApp is connected, you can chain HTTP Request, Google Sheets, Postgres, an AI node, email and whatever else you need without a backend of your own. WhatsApp stops being an isolated box and becomes one more node in your process.

In practice, the three most common cases are: automated support with triage before a human steps in, transactional notifications such as order confirmations or appointment reminders, and lead capture for people who arrive from an ad and need an immediate reply. All of them fit comfortably in an n8n flow once the connection is working.

Official or unofficial API: understand the difference first

There are two ways to connect WhatsApp and they are not interchangeable. The official API (Meta's Cloud API) is the formal route: you register a number, submit templates for approval and pay per message delivered. It is the right choice for large operations that need the official badge and accept the bureaucracy. The downside is setup time and rigidity: outside the 24-hour window you can only talk to the customer with an approved template.

The unofficial API works differently. It connects a regular WhatsApp number through an instance, the same way WhatsApp Web does. You scan a QR code once and from then on you send and receive messages freely, with no templates and no prior approval. It is the fastest way to automate and the one that lets you really build a flow in 10 minutes. The trade-off is that you operate outside the official channel, so you need to look after the number's reputation to reduce the risk of a ban.

In this tutorial we use the unofficial route because it fits the speed we are after. ZapZap API is an instance-based unofficial WhatsApp API that costs R$15 per active number per month, on a prepaid model, and it grants a welcome credit when you create your account, subject to the current campaign. You can see the technical details of the integration on the n8n integration page.

What you need before you start

The list is short. First, a running n8n instance, either the cloud version or a self-hosted one in Docker on your VPS. Either works, as long as it can receive HTTP requests from outside, because the webhook depends on that. If you run n8n locally behind a router, you will need a public tunnel or a domain pointing to the machine.

Second, an account with a WhatsApp instance already created and connected. With ZapZap API you create the account, provision an instance, scan the QR code with your phone and that is it: the number goes online. Keep the instance identifier and the access key, because they authenticate your calls. Since the exact credentials and endpoint paths may change, always check the live reference at api.zapzapapi.com/llms.txt instead of hardcoding values from memory.

Third, a mobile number you are comfortable using for automation. Avoid your main personal number. The ideal is a dedicated SIM card, preferably one that already has some history of human use, because newly created numbers that start sending messages in volume attract the attention of WhatsApp's anti-fraud systems.

Step by step: connect in 10 minutes

Start with sending, which is the easiest part to validate. In n8n, add an HTTP Request node. Set the method to POST and point the URL to your instance's text-sending endpoint in ZapZap API. The request body carries the destination number in international format, for example 5511999999999, and the message text. The authentication key for your instance goes in the headers. The exact field names and the full path are documented at api.zapzapapi.com/llms.txt, so copy them from there to avoid mistakes.

Trigger the flow manually with the test button. If the message arrives on the destination WhatsApp, half the work is done: you can already send messages from any n8n automation. From here on, that same HTTP Request node can be plugged at the end of any flow, a submitted form, a new spreadsheet row, an approved payment, to notify anyone you want on WhatsApp.

Sending media follows the same logic: the endpoint changes and you pass the file URL or the base64 content, depending on what the reference says. It is worth building a second, separate HTTP Request node for media and leaving it ready, because sooner or later you will want to send a receipt, a PDF catalog or an audio file inside the flow.

Receiving messages: setting up the webhook

Sending is only half the story. For WhatsApp to become an automation trigger, n8n needs to be notified every time someone replies. That is done with a webhook. In n8n, create a new flow starting with the Webhook node, set the method to POST and copy the production URL it generates. That URL is the address where incoming messages will be delivered.

Now register that URL as the webhook destination on your ZapZap API instance. From that moment, every message the number receives lands in your n8n flow as a JSON containing the sender, the text and the conversation metadata. You read those fields in the following nodes and decide what to do: reply with AI, forward to a human, save to the database. If you want to process the payload in your own backend before n8n, a generic Express handler does the job:

app.post('/webhook', (req, res) => { const { sender, message } = req.body; console.log('Message from', sender, ':', message); res.sendStatus(200); });

One detail that saves hours of debugging: the webhook must answer fast, ideally with a 200 status right away, and leave the heavy processing to the following nodes. If your endpoint is slow to respond, the platform may treat the delivery as failed and retry, creating duplicate messages in the flow. Respond first, process later.

Best practices to reduce the risk of a ban

Unofficial WhatsApp automation works very well, but it requires respecting the rules of the game. The biggest mistake beginners make is turning the flow on and blasting hundreds of identical messages to numbers that never interacted with them. That is the classic behavior WhatsApp's systems penalize. The rule of thumb is simple: the more your messages look like a real human conversation, the lower the risk of a ban.

A few concrete habits help a lot. Spread sends out with a random interval between them instead of instant bursts, which is easy to do with a wait node in n8n. Prioritize replying to people who wrote first instead of starting cold conversations in bulk. Vary the message text so you do not repeat exactly the same content. And warm up new numbers with gradual use before putting them to work at volume.

This is the scenario ZapZap API was built for: instances by QR code, native webhooks to trigger your flow, community warm-up, an anti-ban layer and AI per instance for the replies that do not need a person. Pair that with a well-built n8n flow and you get a WhatsApp operation that launches fast and holds up day to day, with nobody copying and pasting.

Quick summary

  • The unofficial, instance-based route is the fastest way to automate WhatsApp in n8n, with no templates and no Meta approval.
  • Sending uses an HTTP Request node; receiving depends on a webhook that points to your n8n flow.
  • Answer the webhook with a 200 quickly and leave the heavy work to the following nodes. That avoids duplicate messages.
  • Check api.zapzapapi.com/llms.txt for the correct endpoints and fields instead of hardcoding values from memory.
  • High volume and repeated text raise the risk of a ban; random intervals, text variation and warm-up reduce it.

Also read

Frequently asked questions

Do I need Meta's official API to use WhatsApp in n8n?

No. The official API is one option, but it requires number registration, template approval and an onboarding that takes days. An unofficial instance-based API, such as ZapZap API, connects a regular number through a QR code and lets you send and receive messages freely, which makes it possible to build the flow in about 10 minutes.

How much does it cost to get started?

ZapZap API charges R$15 per active number per month on a prepaid model and grants a welcome credit when you create your account, subject to the current campaign. Each number is billed only while it is active.

How does n8n find out a new message has arrived?

Through a webhook. You create a flow in n8n starting with the Webhook node, copy the production URL it generates and register that URL as the webhook destination on your instance. From then on, every received message lands in the flow as a JSON with sender, text and metadata.

Can automating WhatsApp get my number banned?

There is always some risk when you use an unofficial solution, but you can reduce it considerably. Avoid bulk sends to cold contacts, use random intervals between messages, vary the text and warm up new numbers with gradual use. Anti-ban features and community warm-up help keep the number's reputation healthy.

Plug WhatsApp into your n8n

Connect a number by QR code and paste the webhook URL into your flow. Verify your phone and you get a welcome credit to test without depositing (one per phone, subject to the current campaign).