Skip to main content

Node whatsapp

The whatsapp node provides integration with the WhatsApp Business Cloud API (Meta). It allows the flow to send users regular text messages and approved template messages with variable substitutions.


Settings for the whatsapp node

Edit

1. wa_phone_number_id

The identifier for the sender's number in Meta. You can find it in the WhatsApp → Getting Started section in the Meta Business Manager.

Supports Mustache.

Example:

{{flow.phoneNumberId}}

2. wa_access_token

A permanent access token from the Meta Business Manager.

Supports Mustache — the token can be stored in a flow variable and substituted using {{variable}}.

Example:

{{flow.whatsappToken}}

3. wa_api_version

The version of the Graph API that will be used for requests. This is a static field.

Example:

v19.0

4. wa_action

The type of message being sent. Available options:

  • text — a regular text message. Activates the text field.
  • template — a template message that has been pre-approved in Meta. Activates the templateName, locale, and components fields.

5. wa_to

The recipient's phone number in international format: with the country code, without the + sign, and without spaces.

Supports Mustache.

Example:

{{payload.user.phone}}

or statically: 79001234567


6. wa_text

The text of the message. Used only when action: text.

Supports Mustache.

Example:

Your order №{{payload.orderId}} has been successfully placed. Please await delivery.

7. wa_template_name

The name of the template approved in the Meta Business Manager. Used only when action: template.

Supports Mustache.

Example:

order_confirmation

8. wa_locale

The language of the template in the format language_REGION. It must exactly match the language of the template in the Meta settings.

Examples:

  • en_US — English (US)
  • fr_FR — French

9. wa_components

Template parameters — the values of variables that will be substituted into the template when sending. Used only when action: template.

Each element contains three fields:

  • type — the section of the template: header (header) or body (main body).
  • name — the name of the variable as defined in the WhatsApp Business personal account.
  • text — the value that will be substituted for the variable. Supports Mustache.

Example:

type: body  |  name: order_id   |  text: {{payload.orderId}}
type: body | name: amount | text: {{payload.totalPrice}}

Usage Examples

Example 1: Text Notification for an Order

Flow:

[events: order_created] ---> [whatsapp]

Node Settings:

  • accessToken: {{flow.whatsappToken}}
  • phoneNumberId: {{flow.phoneNumberId}}
  • apiVersion: v19.0
  • action: text
  • to: {{payload.order.phone}}
  • text: Your order №{{payload.order.id}} has been accepted. Total: {{payload.order.totalPrice}} rub.

Result:
When an order is created, the user will receive a WhatsApp message with the order details.


Example 2: Template Message with Variables

Flow:

[cms-events: order_status_changed] ---> [whatsapp]

Node Settings:

  • action: template
  • to: {{payload.order.phone}}
  • templateName: order_status_update
  • locale: en_US
  • components:
    type: body  |  name: order_id    |  text: {{payload.order.id}}
    type: body | name: status | text: {{payload.order.status}}

Result:
The user will receive an approved template message with the substituted values for the order number and status.

info

Template messages must be created in advance and approved in the Meta Business Manager. The values of the templateName and locale fields must exactly match the parameters of the approved template.