Skip to content
Docs

WhatsApp

The WhatsApp node sends a message through the WhatsApp Cloud API. Use it to deliver notifications or an agent’s reply to a WhatsApp user, either as free-form text or as a pre-approved template message. You find it on the node picker’s Channels — send a reply shelf.

It has two handles: input, which takes the upstream node’s output (available in every field as $prev), and output, which passes the send result to the next node.

Store the Meta Graph access token as a secret or as a saved connection and select it in credential.

The WhatsApp node's settings form, with the fields described below
The WhatsApp node's settings form, with the fields described below
FieldTypeDefaultDescription
Phone number (phoneNumberId)string ✦ (required) — The WhatsApp Cloud API phone number id that sends the message.
To (to)string ✦ (required) — The recipient’s phone number in international format.
Text (text)string ✦ (optional) — The plain text body to send. Used when no template name is set.
Template name (templateName)string ✦ (optional) — The name of a pre-approved WhatsApp message template to send instead of free-form text.
Language code (languageCode)string ✦ (optional) — The language/locale code of the chosen template, e.g. en_US.
Template components (templateComponents)string ✦ (optional) — Template parameter blocks as a JSON array, filling the template’s variable placeholders.
Credential (credential)string ✦ (optional) — The Meta Graph API access token used to authenticate the send — a Secret or a saved Connection.
Attachments (attachments)string ✦ (optional) — Files to send after the text — a voice reply a Text to Speech node made, an image, a document.

Fields marked ✦ accept expressions.

Try this node — run it once against your own workspace, with your credentials, without building a flow first.

Attachments picks stored files. Type part of a path, and the field lists the matching files of every file store in your workspace as Store › path, the newest first, 50 at most. One picked file is saved as its object id, several as a JSON array, and a list typed in before the field became a picker opens as its files. For a file another node produced, such as a spoken reply, click Insert a value ({x}) and write an expression, for example {!! $prev->object->versionId !!}.

On a successful send (the Cloud API answers with status 200) the node emits:

{ "status": "sent", "channel": "whatsapp" }

Any other response status fails the node without retrying, with the API’s error message in the failure. An empty access token or phone number id also fails the node.

In the Meta for Developers dashboard, add the WhatsApp product to your app. Copy the phone number ID and a token from the API setup page. Save the token as a secret in Publicus so it stays out of your flow definition.

The WhatsApp support agent template wires the full loop: a WhatsApp webhook trigger, an Agent with conversation memory, and this node as the reply. Configure its reply node like this:

  1. Set credential to the secret holding your access token.
  2. Set phoneNumberId to {{ jsonpath($start->payload, '$.entry[0].changes[0].value.metadata.phone_number_id') }} (the number the inbound message arrived on).
  3. Set to to {{ jsonpath($start->payload, '$.entry[0].changes[0].value.messages[0].from') }} (the inbound sender).
  4. Set text to {!! $prev->content !!} (the Agent node emits its reply under content; the agent’s answer may contain characters that escaping would corrupt).

Send a pre-approved template (for example, from a scheduled flow, where no conversation window is open):

  1. Set credential, phoneNumberId, and to as above.
  2. Set templateName to the template’s name, for example order_update.
  3. Set languageCode to a locale the template was approved in, for example en_US.
  4. If the template has variable placeholders, set templateComponents to a JSON array of component objects:
[
{
"type": "body",
"parameters": [
{ "type": "text", "text": "{!! $prev->orderNumber !!}" }
]
}
]

Leave text empty; it is ignored when a template name is set.

When an agent calls this node as a tool, the send is approval-gated by default; see How to add human approval.

  • The node sends text and template messages only; it does not send media messages.
  • Invalid JSON in templateComponents is silently ignored; the template then sends without parameters and the API rejects it if the template requires them.