Skip to main content

WhatsApp Component

WhatsApp is a messaging app that allows users to send texts, make voice and video calls, and share media.

Component key: whatsapp · Changelog ↓

Description

WhatsApp is a messaging app that allows users to send texts, make voice and video calls, and share media.

Use the component to send messages and configure webhook subscriptions.

API Documentation:

The component was built using the WhatsApp Business Platform Cloud API.

Connections

Access Token

key: whatsapp-access-token

To get started with WhatsApp, you first need to create a Meta developer account.

  1. Select Create app.
  2. In the ‘Add products to your app’ section, select Setup for WhatsApp.
  3. Once the validation has been made to your account, navigate back to the home page of the App
  4. From the side menu find the WhatsApp section and select API Setup.
  5. Select Generate access token and enter the value into the connection configuration of your integration.
  6. Additionally, this screen will also provide your accounts Test Number, Phone number ID, and Business Account ID.
InputNotesExample
Access Token

Your WhatsApp Access Token.

Triggers

Webhook

Receive and validate webhook requests from WhatsApp Business for webhooks you configure. | key: webhook

InputNotesExample
App Secret

The secret that WhatsApp will use to sign your webhook payloads.

6a321a12a123456789abc54321f12a12
Verify Token

The token that WhatsApp will use to verify your webhook.

meatyhamhock

The WhatsApp Business Platform can be configured to send webhook notifications to a flow when events occur, such as incoming messages, message status updates, and more.

This trigger handles Meta's webhook verification challenge and validates all event payloads using HMAC signature verification with the x-hub-signature-256 header.

How It Works

This trigger routes incoming requests to one of two branches based on the request type:

  • Verification Request branch: Handles the initial verification request when configuring the webhook in the Meta App Dashboard. Meta sends a GET request with hub.mode, hub.verify_token, and hub.challenge query parameters. The trigger validates the verify token and responds with the challenge value to confirm the endpoint.
  • Event Notification branch: Handles actual webhook event notifications from WhatsApp. The trigger verifies the x-hub-signature-256 header by computing an HMAC SHA-256 hash of the request body using the configured App Secret, ensuring the payload originates from Meta.

Configuration

Configure the following inputs:

  • Verify Token: A custom string token set during webhook configuration in the Meta App Dashboard. This token must match the value entered in the Callback URL verification settings. It is used only during the initial webhook verification handshake.
  • App Secret: The app secret from the Meta App Dashboard, found under App Settings > Basic. This secret is used to compute the HMAC SHA-256 signature for validating incoming event notification payloads.

Event Types

WhatsApp webhook notifications include various event types based on the subscribed fields:

Common Event Types
EventDescription
messagesIncoming messages (text, media, location, contacts, etc.)
statusesMessage delivery status updates (sent, delivered, read, failed)
errorsError notifications related to message delivery
message_template_status_updateStatus changes for message templates (approved, rejected, etc.)
account_alertsAccount-level alerts and policy notifications
account_updateChanges to the WhatsApp Business Account
phone_number_name_updateUpdates to the display name for a phone number
phone_number_quality_updateQuality rating changes for a phone number
template_category_updateCategory changes for message templates
flowsWhatsApp Flows status updates

Refer to WhatsApp's Webhooks Components documentation for the complete and up-to-date list of available webhook fields and payload structures.

Returned Data

Example Event Notification Payload
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "123456789",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "15551234567",
"phone_number_id": "987654321"
},
"contacts": [
{
"profile": {
"name": "Jane Doe"
},
"wa_id": "15559876543"
}
],
"messages": [
{
"from": "15559876543",
"id": "wamid.ABCxyz123",
"timestamp": "1677000000",
"text": {
"body": "Hello!"
},
"type": "text"
}
]
},
"field": "messages"
}
]
}
]
}

Notes

  • The webhook endpoint must be publicly accessible and use HTTPS for Meta to deliver notifications.
  • During initial setup, the Verify Token must match exactly between the trigger configuration and the Meta App Dashboard webhook settings.
  • If signature verification fails, the trigger rejects the request with an error to prevent processing of unverified payloads.

Data Sources

Select Phone

Select a phone number. | key: selectPhone | type: picklist

InputNotesExample
Connection
WhatsApp Business Account ID

The ID of the WhatsApp Business Account to retrieve phone numbers for.

12345678901234567

Actions

Delete Media

Delete a media file from a phone number. | key: deleteMedia

InputNotesExample
Connection
Media ID

The ID of the media file to delete.

1234567890123456

{
"data": {
"success": true
}
}

Get Media

Get media from WhatsApp. | key: getMedia

InputNotesExample
Connection
Media ID

The ID of the media to retrieve.

1234567890123456
Phone Number ID

Business phone number ID. The operation will proceed only if it matches the ID used to upload the media.

912345678912345

{
"data": {
"messaging_product": "whatsapp",
"url": "<URL>",
"mime_type": "<MIME_TYPE>",
"sha256": "<HASH>",
"file_size": "<FILE_SIZE>",
"id": "<MEDIA_ID>"
}
}

Get Media from URL

Download media from a URL. | key: getMediafromURL

InputNotesExample
Connection
URL

A URL returned by the Get Media action to download media from.

https://lookaside.fbsbx.com/whatsapp_business/attachments/?mid=12345...

{
"data": "<BINARY_DATA>"
}

Raw Request

Send raw HTTP request to WhatsApp Business API. | key: rawRequest

InputNotesExample
Connection
Data

The HTTP body payload to send to the URL.

{"exampleKey": "Example Data"}
Debug Request

Enabling this flag will log out the current request.

false
File Data

File Data to be sent as a multipart form upload.

[{key: "example.txt", value: "My File Contents"}]
File Data File Names

File names to apply to the file data inputs. Keys must match the file data keys above.

Form Data

The Form Data to be sent as a multipart form upload.

[{"key": "Example Key", "value": new Buffer("Hello World")}]
Header

A list of headers to send with the request.

User-Agent: curl/7.64.1
Max Retry Count

The maximum number of retries to attempt. Specify 0 for no retries.

0
Method

The HTTP method to use.

Query Parameter

A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.

Response Type

The type of data you expect in the response. You can request json, text, or binary data.

json
Retry On All Errors

If true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors.

false
Retry Delay (ms)

The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled.

0
Timeout

The maximum time that a client will await a response to its request

2000
URL

Input the path only (/106540352242922/messages), The base URL is already included (https://graph.facebook.com/v21.0). For example, to connect to https://graph.facebook.com/v21.0/106540352242922/messages, only /106540352242922/messages is entered in this field.

/106540352242922/messages
Use Exponential Backoff

Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored.

false

Register Phone Number

Register a phone number for use with WhatsApp. | key: registerPhoneNumber

InputNotesExample
Connection
Data Localization Region

Enables local storage for the business phone number. Specify the country for data-at-rest storage.

IN
Phone Number ID

The ID of the phone number to register.

912345678912345
PIN

Set this to your 6-digit two-step verification PIN if enabled. If not, set a new 6-digit PIN.

123456

{
"data": {
"success": true
}
}

Request Verification Code

Send a verification code to verify a phone number. | key: requestVerificationCode

InputNotesExample
Code Method

The method to use to send the verification code.

SMS
Connection
Language

The language's two-character language code code.

en
Phone Number ID to Verify

The ID of the phone number to verify.

912345678912345

{
"data": {
"success": true
}
}

Send Message

Send a message to a user. | key: sendMessage

InputNotesExample
Audio

A media object containing audio. Required when type is audio.

Biz Opaque Callback Data

An arbitrary string, useful for tracking. Maximum 512 characters.

Some arbitrary string
Connection
Contacts

A contacts object. Required when type is contacts.

Context

An object containing the ID of a previous message you are replying to. Required if replying to any message in the conversation.

Document

A media object containing a document. Required when type is document.

Image

A media object containing an image. Required when type is image.

Interactive

An interactive object. Required when type is interactive.

Location

A location object. Required when type is location.

Phone Number ID

Phone number ID of the WhatsApp Business Account you want to use to send the message.

912345678912345
Preview URL

Allows for URL previews in text messages. Required when type is text.

false
Reaction

A reaction object. Required when type is reaction.

Status

A message's status. You can use this field to mark a message as read.

read
Sticker

A media object containing a sticker. Required when type is sticker.

Template

A template object. Required when type is template.

Text

A text object. Required when type is text.

To

WhatsApp ID or phone number of the customer you want to send a message to.

12124567890
Type

The type of message you want to send. If omitted, defaults to text.

text

{
"data": {
"messaging_product": "whatsapp",
"contacts": [
{
"input": "16505555555",
"wa_id": "16505555555"
}
],
"messages": [
{
"id": "wamid.HBgLMTY1MDUwNzY1MjAVAgARGBI5QTNDQTVCM0Q0Q0Q2RTY3RTcA"
}
]
}
}

Upload Media

Upload media to WhatsApp. | key: uploadMedia

InputNotesExample
Connection
File

The file to upload. This should be a file returned from an action that returns a file.

Filename

The filename to use for the uploaded file.

example.jpg
Phone Number ID

The ID of the phone number to upload media to.

912345678912345

{
"data": {
"id": "<MEDIA_ID>"
}
}

Changelog

2026-04-07

Added trigger documentation

2026-03-31

Various modernizations and documentation updates