Skip to main content

WhatsApp Adaptor

About WhatsApp

The WhatsApp Business Platform enables organizations to communicate with their customers on WhatsApp at scale. It supports sending messages, notifications, and media, as well as receiving inbound customer messages through a secure and reliable API.

This adaptor allows OpenFn users to integrate workflows with WhatsApp Business Cloud or On-Premise APIs to send and receive WhatsApp messages as part of automated processes.

Integration Options

The WhatsApp Business API provides a REST API to manage message sending, conversations, and contacts. See functions for examples of how to use this adaptor to call the API.

In addition, WhatsApp Business supports Webhooks that deliver inbound messages and delivery status updates in real time. These can be consumed by OpenFn workflows via a webhook event trigger when customers send messages.

Authentication

Access to the WhatsApp Business API requires a Permanent Access Token (for Cloud API) or a generated Bearer Token (for On-Premise deployments). This token must be included as an Authorization Bearer Token in all requests.

For Cloud API, you must also specify your phone_number_id and whatsapp_business_account_id. See Meta WhatsApp Business docs for detailed guidance.

OpenFn users can use the whatsapp credential type when creating a credential on the app.

If working locally or if using a Raw JSON credential type in OpenFn, your configuration will look something like this (see configuration docs):

{
"baseUrl": "https://graph.facebook.com/v21.0",
"apiToken": "EAAJZC...your_long_lived_access_token",
"phoneNumberId": "123456789012345",
"wabaId": "987654321098765"
}