Skip to content

WhatsApp Business ​

Sends a WhatsApp message from your business number: an approved template, a text or a document produced by the workflow.

The WhatsApp Business node sends a message from your business number. Outside the 24-hour window opened by the customer’s last message, only an approved template goes out: it is the default action (appointment reminder, acknowledgement of a file).

It works with a WhatsApp Business connection. See WhatsApp Business.

At a glance ​

  • Type: whatsapp.api · version 1
  • Category: Data
  • Kind: Step — one stage of a run
  • Effect: Writes outside (external_write) — writes outside Loop & Roll; described instead of performed during a test run
  • Needs a carrier email: No
  • Connection: WhatsApp
  • Inputs: main
  • Outputs: main
The ports of “WhatsApp Business”: what comes in on the left, what goes out on the rightInput: main. Outputs: main. An error output appears when its failure setting is “Follow the Error output”. It needs a WhatsApp connection.WhatsApp Businesswhatsapp.apimainmainerror · only with “Follow the Error output”Connection: WhatsApp
The ports of “WhatsApp Business”: what comes in on the left, what goes out on the right

Connection ​

This node needs a WhatsApp connection.

Parameters ​

connection ​

WhatsApp Business connection — The WhatsApp Business connection to use. Create it once in Connections; its key never appears in the workflow.

  • Type: Connection (credential)
  • Required: Yes
  • Default: "" (empty)

action ​

Action

  • Type: One choice (options)
  • Required: Yes
  • Default: sendTemplate
  • Options:
    • sendTemplate — Send an approved template: The only message you can send to a customer who has not written in 24 hours.
    • sendText — Send a text: Only within 24 hours of the customer’s last message.
    • sendDocument — Send a document: An attachment from the email or added by a step (a quote, an inventory report), within the same 24-hour window.

phoneNumberId ​

Sending phone number id — The “Phone number ID” from WhatsApp Manager → API setup — not the number itself.

  • Type: Text (string)
  • Required: Yes
  • Default: "" (empty)
  • 40 characters at most
  • Expressions: {{ }} accepted

to ​

Recipient — The number in international format (+33612345678).

  • Type: Text (string)
  • Required: Yes
  • Default: "" (empty)
  • 30 characters at most
  • Expressions: {{ }} accepted

template ​

Template name — The exact name of an approved template in WhatsApp Manager (appointment_reminder).

  • Type: Text (string)
  • Required: Yes
  • Default: "" (empty)
  • 512 characters at most
  • Shown when: action is sendTemplate
  • Expressions: {{ }} accepted

language ​

Template language — The template’s language code (fr, en_US).

  • Type: Text (string)
  • Required: Yes
  • Default: fr
  • 10 characters at most
  • Shown when: action is sendTemplate
  • Expressions: {{ }} accepted

parameters ​

Template variables — One value per line, in the order of the template body’s {{1}}, {{2}}… variables. Accepts expressions.

  • Type: Long text (text)
  • Required: No
  • Default: "" (empty)
  • 4000 characters at most
  • Shown when: action is sendTemplate
  • Expressions: {{ }} accepted

body ​

Message

  • Type: Long text (text)
  • Required: Yes
  • Default: "" (empty)
  • 8000 characters at most
  • Shown when: action is sendText
  • Expressions: {{ }} accepted

previewUrl ​

Link preview

  • Type: Yes / no (boolean)
  • Required: No
  • Default: false
  • Shown when: action is sendText

caption ​

Caption

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 1024 characters at most
  • Shown when: action is sendDocument
  • Expressions: {{ }} accepted

selection ​

Attachments to use

  • Type: One choice (options)
  • Required: Yes
  • Default: all
  • Options:
    • all — All attachments: Those of the triggering email, then the files added by earlier steps (a fetched deed, a signed PDF), in that order.
    • first — The first one only: The first attachment, when only one matters.
    • byMime — By file type: By MIME type: application/pdf, or a whole family with image/*.
    • byName — By file name: By name pattern: *.pdf, invoice-*.
  • Shown when: action is sendDocument

mime ​

File type — Exact MIME type (application/pdf) or a whole family (image/*). Left empty, no attachment is kept.

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 200 characters at most
  • Example: application/pdf
  • Shown when: action is sendDocument and selection is byMime
  • Expressions: {{ }} accepted

namePattern ​

File name — Simple pattern: * matches anything, ? one character (*.pdf, invoice-*). Case is ignored.

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 200 characters at most
  • Example: *.pdf
  • Shown when: action is sendDocument and selection is byName
  • Expressions: {{ }} accepted

Outputs ​

  • main — Taken once WhatsApp accepts the message. A refusal (outside the 24-hour window, unknown template, invalid number) fails the step instead.

Data produced ​

What this node adds to the run data, and how to read it in an expression. <step> stands for the step key: the node name turned into an identifier (see Data and expressions).

  • {{ data.<step>.messageId }} — string. The message id (wamid…), empty in a test run.
  • {{ data.<step>.to }} — string. The recipient number, normalised (digits only).
  • {{ data.<step>.simulated }} — boolean. true when the send was described instead of done (test run).
  • {{ data.<step>.summary }} — string. The one-line summary in the member’s language.

Operations ​

  • Send an approved template — name, language, and one value per line for the {{1}}, {{2}}… variables.
  • Send a text.
  • Send a document — an attachment from the email or added by a step, with a caption.

Loop & Roll — the workflow builder for email.