# Set up the WhatsApp Trigger node in n8n

> n8n's WhatsApp Trigger needs an App ID and App Secret, and your app subscribed to the WABA. Set it up, pick events and reply with the Cloud node.

Published 2026-11-04. Z-API Omni team.

The WhatsApp Trigger node in n8n authenticates with an OAuth2 credential made of your Meta App ID and App Secret. When you publish the workflow, n8n registers its webhook URL on that Meta app. It does not subscribe the app to your WhatsApp Business Account (WABA), and without that subscription no message ever reaches the workflow. Replies go out through a second node, WhatsApp Business Cloud. It uses a different credential: an access token plus the WABA ID ([n8n WhatsApp credentials, accessed 2026-11-04](https://docs.n8n.io/integrations/builtin/credentials/whatsapp/)).

## Create the two credentials

n8n's credentials page lists the prerequisites: a Meta developer account, a Meta business portfolio (formerly Business Manager) and a Meta business app with WhatsApp added. Both credentials come from that one app.

| Node | Credential type | Fields | Where in the Meta app |
| --- | --- | --- | --- |
| WhatsApp Trigger | OAuth2 | Client ID = App ID, Client Secret = App Secret | App settings > Basic |
| WhatsApp Business Cloud | API key | Access Token, Business Account ID (the WABA ID) | WhatsApp > API Setup |

The credential has no field for a phone number ID. The Cloud node lists the WABA's numbers itself when you pick a sender.

For the access token, n8n's steps point at **Generate access token** on API Setup and don't say which token type to keep. Meta's access token page warns that user access tokens "expire quickly" ([Meta access tokens, accessed 2026-11-04](https://developers.facebook.com/documentation/business-messaging/whatsapp/access-tokens)). You "have to keep generating a new one every few hours." For a workflow that runs unattended, create a system user token with `business_management`, `whatsapp_business_management` and `whatsapp_business_messaging`. The steps are in [WhatsApp Cloud API tokens: temporary, system user and business](/academy/articles/whatsapp-cloud-api-access-tokens-system-user/).

## Pick the events

The node's **Trigger On** field is required and takes several events at once ([WhatsApp Trigger node, accessed 2026-11-04](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.whatsapptrigger/)). The values below are the webhook field names n8n sends to Meta, taken from the [node's source code](https://raw.githubusercontent.com/n8n-io/n8n/master/packages/nodes-base/nodes/WhatsApp/WhatsAppTrigger.node.ts) (accessed 2026-11-04).

| Display name | Meta field |
| --- | --- |
| Messages | `messages` |
| Message Template Status Update | `message_template_status_update` |
| Message Template Quality Update | `message_template_quality_update` |
| Template Category Update | `template_category_update` |
| Phone Number Quality Update | `phone_number_quality_update` |
| Phone Number Name Update | `phone_number_name_update` |
| Account Update | `account_update` |
| Account Review Update | `account_review_update` |
| Business Capability Update | `business_capability_update` |
| Security | `security` |

Delivery statuses arrive with **Messages**. The option **Receive Message Status Updates** filters them, with values all, sent, delivered, read, failed and deleted, and a default of all. In the source, an empty selection drops every status event.

## What n8n registers when you publish

This part comes from n8n's source code, not its docs, so it can change between n8n versions. On activation, the node calls Meta's app subscription endpoint with your App ID. It sends `object: whatsapp_business_account`, the node's webhook URL as `callback_url`, the selected events as `fields`, and the node's own ID as `verify_token`. You can't set the verify token yourself.

Incoming POSTs are checked with an HMAC-SHA256 of the raw body, keyed with the App Secret, against `x-hub-signature-256`. On a mismatch the node answers `{}` and the workflow doesn't run. The mechanism is the one in [webhook signature verification](/academy/articles/whatsapp-webhook-signature-verification-x-hub-signature-256/).

If the app already has a subscription with a different callback URL, publishing fails. The source throws: "The WhatsApp App ID ${appId} already has a webhook subscription. Delete it or use another App before executing the trigger." When only the fields differ, n8n deletes and recreates the subscription without telling you. If another tool already uses the app's webhook, give n8n its own Meta app.

## One app, one webhook

n8n's trigger page says "WhatsApp only allows you to register a single webhook per app." That collides with n8n's two URLs. Selecting **Listen for Test Event** registers the test URL, and publishing registers the production URL ([Webhook node, accessed 2026-11-04](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.webhook/)). The node's source refuses a second URL: if the app already holds a different callback, n8n throws the error described above instead of overwriting it.

n8n's workaround has three steps. Click **Unpublish** in the workflow settings menu, test with the test URL, then click **Publish** again. Production traffic stops while the workflow is unpublished, so pick a quiet hour if the number serves live customers. Production executions show only under the **Executions** tab, not in the editor. The same test and production mix-up on the generic Webhook node is in [n8n webhook not receiving events](/academy/articles/n8n-webhook-not-receiving-production-url/).

## No executions when messages arrive

When the trigger is published and messages still produce no runs, check that the app is subscribed to the WABA. n8n's trigger page explains that "Meta sends WhatsApp webhooks for a WhatsApp Business Account (WABA) only to apps subscribed to that account." Publishing "doesn't subscribe your app to your WABA." n8n then shows no failed execution. A test event from the Meta App Dashboard can still arrive, so a passing test doesn't rule this out.

1. Copy the WABA ID from API Setup. The phone number ID won't work here.
2. Get a token for the same app with `whatsapp_business_management`.
3. Run the GET below and look for your App ID (the credential's Client ID) at `whatsapp_business_api_data.id` in `data`.
4. If it's missing, run the POST with no body, expect `{"success": true}`, then run the GET again.
5. Send a message to the business number from a phone and check **Executions**.

These are n8n's calls with the version filled in and tabs replaced by spaces.

```bash
curl -X GET 'https://graph.facebook.com/v26.0/WABA_ID/subscribed_apps' \
  -H 'Authorization: Bearer ACCESS_TOKEN'

curl -X POST 'https://graph.facebook.com/v26.0/WABA_ID/subscribed_apps' \
  -H 'Authorization: Bearer ACCESS_TOKEN'
```

Read your app's entry in the GET response for `override_callback_uri`. If it's there, "Meta sends message webhooks for this WABA to that URL instead of to your app's webhook URL." An override on the business phone number "takes precedence over both."

Don't try to clear the `already has a webhook subscription` error with a DELETE on `subscribed_apps`. n8n warns that the call "unsubscribes your app from your WABA, and Meta stops sending webhooks for that account." That error is about the app's webhook URL. The broader checklist, outside n8n, is in [WhatsApp webhook not receiving messages](/academy/articles/whatsapp-webhook-not-receiving-messages-troubleshooting/).

## Reply with the WhatsApp Business Cloud node

The Cloud node covers Send, Send and Wait for Response and Send Template for messages ([WhatsApp Business Cloud node, accessed 2026-11-04](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.whatsapp/)). For media it has Upload, Download and Delete. For anything else, n8n points you to the HTTP Request node. A text reply needs four fields, per the node's [source](https://raw.githubusercontent.com/n8n-io/n8n/master/packages/nodes-base/nodes/WhatsApp/MessagesDescription.ts).

| Field | What to put in it |
| --- | --- |
| Sender Phone Number (or ID) | Your business number, listed as `display_phone_number - verified_name` |
| Recipient's Phone Number | The customer's number, with country code |
| MessageType | `text` (also audio, contacts, document, image, location, video) |
| Text Body | Up to 4096 characters |

n8n doesn't document the JSON shape the trigger outputs, so open a test execution and map the sender from there. In Meta's `messages` webhook the sender's number is `messages[0].from` and `contacts[0].wa_id` ([receive WhatsApp messages in Node.js](/academy/articles/whatsapp-webhook-nodejs-express-receive-messages/)). Senders with a WhatsApp username can arrive without a phone number, as explained in [WhatsApp usernames and BSUIDs](/academy/articles/whatsapp-usernames-business-scoped-user-ids/). The Cloud node's field asks for a phone number, so send to a BSUID with the HTTP Request node.

A free-form text reply only works inside the 24-hour window, which n8n's node page doesn't cover. Outside it, use Send Template, where the **Template** field takes a template from the list or an expression in the form `name|language`. Meta's side of the rule is in [error 131047](/academy/articles/whatsapp-error-131047-24-hour-window-templates/).

## Errors n8n lists

n8n's common issues page names two ([common issues, accessed 2026-11-04](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.whatsapp/common-issues/)). "Bad request - please check your parameters" shows up most with Send Template, when the mapped values don't match the template's parameter types or order. Fix the mapping with an Edit Fields (Set) node or a fallback value. For media operations, set **Input Data Field Name** or **Property Name** to the field name itself, `data`. Don't use an expression such as `{{ $json.input.data }}`.

If one customer message starts two executions, add a dedupe step. A version keyed on the message ID is in [duplicate WhatsApp webhooks in n8n](/academy/articles/n8n-duplicate-webhooks-idempotency/). The full agent flow built on this trigger is in [how to put an AI agent on WhatsApp with n8n](/academy/articles/whatsapp-ai-agent-n8n-step-by-step/).

*Z-API Omni team*
