Skip to main content

WhatsApp Connector

WhatsApp WhatsApp is a messaging app that allows users to send texts, make voice and video calls, and share media. This component allows sending messages and configuring webhook subscriptions through the WhatsApp Business Platform.

API Documentation

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

Connections

Access Token

Authenticate requests using an access token.

To get started with WhatsApp, create a Meta developer account.

Prerequisites

  • A Meta developer account
  • A Meta app with the WhatsApp product added

Setup Steps

  1. Select Create app.
  2. In the "Add products to your app" section, select Set up for WhatsApp.
  3. Once the account validation is complete, navigate back to the app's home page.
  4. From the side menu, find the WhatsApp section and select API Setup.
  5. Select Generate access token and copy the value.
  6. This screen also provides the account's Test Number, Phone number ID, and Business Account ID.

Configure the Connection

  • Enter the generated value into the Access Token field of the connection configuration.
InputCommentsDefault
Access TokenYour WhatsApp Access Token.

Triggers

Webhook

Receive and validate webhook requests from WhatsApp Business for manually configured webhook subscriptions.

InputCommentsDefault
Verify TokenThe token that WhatsApp will use to verify the webhook.
App SecretThe secret that WhatsApp will use to sign the webhook payloads.

Actions

Delete Media

Delete a media file from a phone number.

InputCommentsDefault
ConnectionThe WhatsApp connection to use.
Media IDThe ID of the media file to delete.

Get Media

Get media from WhatsApp.

InputCommentsDefault
ConnectionThe WhatsApp connection to use.
Media IDThe ID of the media to retrieve.
Phone Number IDBusiness phone number ID. The operation will proceed only if it matches the ID used to upload the media.

Get Media from URL

Download media from a URL.

InputCommentsDefault
ConnectionThe WhatsApp connection to use.
URLThe URL returned by the Get Media action to download media from.

Raw Request

Send raw HTTP request to WhatsApp Business API.

InputCommentsDefault
ConnectionThe WhatsApp connection to use.
URLInput 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.
MethodThe HTTP method to use.
DataThe HTTP body payload to send to the URL.
Form DataThe Form Data to be sent as a multipart form upload.
File DataFile Data to be sent as a multipart form upload.
File Data File NamesFile names to apply to the file data inputs. Keys must match the file data keys above.
Query ParameterA 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.
HeaderA list of headers to send with the request.
Response TypeThe type of data you expect in the response. You can request json, text, or binary data.json
TimeoutThe maximum time that a client will await a response to its request
Debug RequestEnabling this flag will log out the current request.false
Retry Delay (ms)The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled.0
Retry On All ErrorsIf 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
Max Retry CountThe maximum number of retries to attempt. Specify 0 for no retries.0
Use Exponential BackoffSpecifies 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.

InputCommentsDefault
ConnectionThe WhatsApp connection to use.
Phone Number IDThe ID of the phone number to register.
PINThe 6-digit two-step verification PIN. If two-step verification is enabled, provide the existing PIN; otherwise set a new 6-digit PIN.
Data Localization RegionEnables local storage for the business phone number. Specify the country for data-at-rest storage.

Request Verification Code

Send a verification code to verify a phone number.

InputCommentsDefault
ConnectionThe WhatsApp connection to use.
Phone Number ID to VerifyThe ID of the phone number to verify.
Code MethodThe method to use to send the verification code.
LanguageThe two-character language code for the verification message.en

Send Message

Send a message to a user.

InputCommentsDefault
ConnectionThe WhatsApp connection to use.
Phone Number IDThe phone number ID of the WhatsApp Business Account used to send the message.
ToThe WhatsApp ID or phone number of the customer to send a message to.
TypeThe type of message to send. If omitted, defaults to text.text
AudioA media object containing audio. Required when type is audio.
ContactsA contacts object. Required when type is contacts.
DocumentA media object containing a document. Required when type is document.
StickerA media object containing a sticker. Required when type is sticker.
TemplateA template object. Required when type is template.
TextA text object. Required when type is text.
ImageA media object containing an image. Required when type is image.
ReactionA reaction object. Required when type is reaction.
InteractiveAn interactive object. Required when type is interactive.
LocationA location object. Required when type is location.
Preview URLWhen true, enables URL previews in text messages. Required when type is text.false
Biz Opaque Callback DataAn arbitrary string, useful for tracking. Maximum 512 characters.
ContextAn object containing the ID of a previous message being replied to. Required when replying to any message in the conversation.
StatusA message's status. Use this field to mark a message as read.

Upload Media

Upload media to WhatsApp.

InputCommentsDefault
ConnectionThe WhatsApp connection to use.
Phone Number IDThe ID of the phone number to upload media to.
FileThe file to upload. This should be a file returned from an action that returns a file.
FilenameThe filename to use for the uploaded file.