WhatsApp API & Developers

WhatsApp n8n Workflows: Cloud Node and Webhook Setup

n8n is the automation tool developers reach for when Zapier gets expensive or too closed: you can self-host it, write real JavaScript in a node, and wire an AI agent between a message and a reply. WhatsApp is a popular thing to connect to it, and a steady source of "my trigger never fires" forum posts.

This guide covers both ways to build WhatsApp n8n workflows. The first uses n8n's built-in WhatsApp Business Cloud node and WhatsApp Trigger, which talk to Meta's platform. The second uses a Webhook node and an HTTP Request node against Tenashi's API, which sends from a number you already use and has no dedicated n8n node. Then come the self-hosting settings that decide whether either one works in production.

Two ways to connect WhatsApp to n8n

Built-in WhatsApp nodesWebhook node and HTTP Request node
Talks toMeta's WhatsApp Business Platform (Cloud API)Any HTTP API, here Tenashi's
NumberRegistered on Meta's platformYour existing WhatsApp or WhatsApp Business number, linked by QR
SendingWhatsApp Business Cloud nodeHTTP Request node, POST to /api/v1/messages
ReceivingWhatsApp Trigger nodeWebhook node, registered as a Tenashi webhook endpoint
RulesTemplates outside the 24-hour window, per-message pricingNo templates, paced sends, 50 new chats a day per number

Pick by number, not by tool. If your number is on the Cloud API, or you need templates, verified sending or high volume, use the built-in nodes. If customers message a regular WhatsApp or WhatsApp Business number that your team works, the second pattern fits. The complete guide to the WhatsApp API explains the platform differences in depth.

The built-in nodes: WhatsApp Business Cloud and WhatsApp Trigger

n8n ships two nodes for Meta's platform, documented on n8n's WhatsApp Business Cloud page.

WhatsApp Business Cloud is the action node. Its Message operations are Send, Send Template, and Send and Wait for Response; its Media operations are Upload, Download and Delete. It uses a credential with an access token and your WhatsApp Business Account ID. For anything the node doesn't expose, n8n's docs suggest the HTTP Request node with the same credential, which gives you the full Cloud API.

Send and Wait for Response is the one most people overlook. It sends a message and pauses the workflow until the person answers, with approval, free text or a custom form as the response type and a time limit you set. That makes approval loops easy: a refund over a threshold goes to a manager on WhatsApp, and the workflow continues only when they approve.

WhatsApp Trigger starts a workflow from Meta's webhooks: Messages, plus account, template and phone number events. It uses a separate OAuth2 credential with your Meta app's client ID and secret, not the access-token credential, which trips people up on first setup.

Three trigger problems account for most forum threads:

  1. One webhook per Meta app. Meta allows one callback URL per app. Switching between n8n's test URL and production URL overwrites the registration, so the other one stops receiving. n8n's suggestion for testing a live workflow is to unpublish, test, and republish, which halts production traffic while it is off. A second Meta app for development avoids the dance.
  2. Not subscribed to the WhatsApp Business Account. Publishing registers the callback URL but does not subscribe your app to the WABA. Without that subscription, no messages arrive, even though Meta's dashboard test event succeeds. Check with a GET on the WABA's subscribed_apps edge and add the subscription with a POST if your app is missing. Don't send a DELETE to clear an "already has a webhook subscription" error; that stops webhooks for the account.
  3. Message rules still apply. The node can send free-form text only within 24 hours of the person's last message. Outside that, use Send Template with an approved template.

When a trigger stays silent, work through why WhatsApp webhooks stop working in order before rebuilding anything.

The Webhook and HTTP Request pattern for Tenashi

Tenashi has no n8n node, and doesn't need one: its webhooks POST signed JSON to any HTTPS URL, and n8n webhook URLs work as they are. A complete receive-and-reply workflow is five nodes.

1. Webhook node. HTTP Method POST, a path such as tenashi, Respond set to Immediately. Under Options, turn on Raw Body so the exact bytes are kept for the signature check. Copy the production URL, publish the workflow, and add the URL in Tenashi under Settings, API and webhooks, subscribed to message.received. Tenashi wants a 2xx within 10 seconds; responding immediately guarantees it.

2. Code node (JavaScript). It builds the string Tenashi signed, which is the timestamp, a dot and the raw body:

// Code node: prepare the signed string and parse the event
const raw = await this.helpers.getBinaryDataBuffer(0, 'data');
const headers = $input.first().json.headers;
const timestamp = String(headers['x-tenashi-timestamp'] || '');

return [{
  json: {
    toSign: `${timestamp}.${raw.toString('utf8')}`,
    signature: String(headers['x-tenashi-signature'] || '').replace(/^v1=/, ''),
    fresh: Math.abs(Date.now() / 1000 - Number(timestamp)) < 300,
    event: JSON.parse(raw.toString('utf8')),
  },
}];

getBinaryDataBuffer is n8n's documented way to read binary data in a Code node. With Raw Body on, the body sits in the item's binary data; if a test execution shows a property name other than data, use that name.

3. Crypto node. Action Hmac, Type SHA256, Value {{ $json.toSign }}, Encoding HEX, Property Name expected. Put your endpoint's whsec_... secret in the Crypto credential, so it lives in n8n's encrypted credential store rather than in the workflow JSON.

4. IF node. Continue only when {{ $json.expected === $json.signature && $json.fresh }} is true. Anything else stops here.

5. HTTP Request node. Method POST, URL https://usetenashi.com/api/v1/messages. Authentication: Generic Credential Type, Header Auth, with name Authorization and value Bearer tk_live_.... Turn on Send Headers and add Idempotency-Key with the value {{ $json.event.id }}-ack. Send Body as JSON using fields below, with two fields: conversationId set to {{ $json.event.data.message.conversationId }} and text set to your reply. Tenashi receives:

{
  "conversationId": "cmh0a9s8d7f6g5h4j3k2l1",
  "text": "Thanks Priya, we got your message. A teammate will reply here shortly."
}

Replying by conversationId works in a group as well as a DM, so add a condition on {{ $json.event.data.message.chat.type }} before auto-replying, or a bot will answer every message in a busy group. The idempotency key built from the event ID matters because webhook deliveries are at least once: if Tenashi retries an event, the second reply attempt returns the first response and sends nothing.

Why both the raw body and the timestamp are signed: see verifying WhatsApp webhook signatures.

Adding an AI agent, and the policy line to stay behind

The obvious next step in n8n is an AI Agent node between the webhook and the reply. Two cautions.

On Meta's platform, the WhatsApp Business Solution Terms no longer allow general-purpose AI assistants from AI model providers, effective January 15, 2026. AI used for your own customer service, such as answering order questions, booking or support, is still allowed. Keep the agent scoped to your business. Our WhatsApp AI chatbot policy explainer covers where the line sits.

On any number, an agent that answers everything will eventually say something wrong to a customer. A safer pattern is to have the agent draft and a person send: the workflow posts the draft to a Slack thread or a task, and a teammate replies from the inbox. The guide to connecting an AI agent to WhatsApp compares the approaches.

Self-hosting n8n for WhatsApp

Both patterns depend on n8n being reachable from the internet over HTTPS. Meta rejects self-signed certificates, and Tenashi only delivers to https URLs.

  • Set the public URL. Behind a reverse proxy, n8n has to know its public address or it shows webhook URLs pointing at localhost. Set N8N_WEBHOOK_URL, for example https://n8n.example.com/. WEBHOOK_URL is deprecated from n8n 2.35.0 and logs a warning.
  • Payload size. The Webhook node accepts up to 16 MB by default; raise N8N_PAYLOAD_SIZE_MAX if you receive large media payloads.
  • Modules in the Code node. Self-hosted n8n blocks module imports in the Code node by default. The workflow above avoids require entirely by using the Crypto node. If you prefer crypto in code, set NODE_FUNCTION_ALLOW_BUILTIN=crypto. On n8n Cloud, crypto is available without configuration.
  • Execution data is customer data. Every execution stores the message text and phone numbers. Pruning is on by default with a 336-hour maximum age (EXECUTIONS_DATA_MAX_AGE); lower it, or set EXECUTIONS_DATA_SAVE_ON_SUCCESS=none for workflows you don't need to inspect.
  • Keep the URL stable. A new domain or path means re-registering it with Meta or Tenashi. Tenashi switches off an endpoint after 3 days of failures, so turn it back on after a long outage.

Where Tenashi fits

n8n is good at the logic in the middle: routing, enrichment, an agent's first draft. What it isn't is a place for a team to read and answer WhatsApp conversations. With the Cloud API nodes, the number also has to live on Meta's platform, with templates and per-message pricing.

Tenashi links your existing WhatsApp or WhatsApp Business number by QR scan and gives your team a shared inbox for DMs and groups, with a CRM, tickets and notes under each chat. n8n listens through signed webhooks and sends through the API, and everything it sends shows up in the same threads your team works. The limits: no n8n node, no templates or interactive buttons, and sends are paced at one every 4 to 12 seconds per number to lower ban risk, which never removes it entirely. From $18/mo.

Read the API docs · Get started

FAQ

Does n8n have a WhatsApp node?

Yes. n8n includes the WhatsApp Business Cloud node for sending messages, templates and media through Meta's Cloud API, and the WhatsApp Trigger node for incoming messages and account events. Both require a number on Meta's WhatsApp Business Platform. Other APIs, such as Tenashi's, connect through the Webhook and HTTP Request nodes.

Why does my n8n WhatsApp Trigger never fire?

Most often the Meta app is not subscribed to the WhatsApp Business Account, so the webhook is registered but no messages are routed to it. Check the account's subscribed_apps edge and subscribe the app if it is missing. Also check you are not testing with the test URL while expecting the production URL to receive.

Can I use n8n with a regular WhatsApp Business app number?

Not through the built-in WhatsApp nodes, which need a number registered on Meta's platform. A service that links your existing number, such as Tenashi, works with n8n through webhooks and the HTTP Request node, so the messages come from the same number your customers already use, including in groups.

How do I verify Tenashi webhook signatures in n8n?

Turn on Raw Body in the Webhook node, build the string timestamp.rawBody in a Code node, compute an HMAC-SHA256 in hex with the Crypto node using your whsec_ secret, and compare it with the X-Tenashi-Signature value in an IF node. Also reject timestamps older than five minutes.

Is self-hosted n8n or n8n Cloud better for WhatsApp?

Either works. n8n Cloud gives you a public HTTPS URL with no setup, and crypto is available in the Code node. Self-hosting keeps message data on your own servers, which some teams need, but you must handle TLS, set N8N_WEBHOOK_URL, and keep the instance online, since webhooks to a dead server are retried and eventually dropped.


Whichever pattern you choose, the shape is the same: a trigger that verifies, logic in the middle, and a send that is safe to retry. Compare it with the Zapier version if your team is choosing a tool, and read the Tenashi API docs to connect your own number.