From e61cdc5326ed2c42852d7010ba886b4c689a072e Mon Sep 17 00:00:00 2001 From: aleksa-krolls Date: Mon, 25 Aug 2025 12:59:15 +0300 Subject: [PATCH 1/3] overview page for whatsapp adaptor --- adaptors/whatsapp.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 adaptors/whatsapp.md diff --git a/adaptors/whatsapp.md b/adaptors/whatsapp.md new file mode 100644 index 00000000000..e249f2a4d0e --- /dev/null +++ b/adaptors/whatsapp.md @@ -0,0 +1,41 @@ +--- +title: WhatsApp Adaptor +--- + +## About WhatsApp + +The [WhatsApp Business Platform](https://developers.facebook.com/docs/whatsapp) 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](https://developers.facebook.com/docs/whatsapp/api) to manage message sending, conversations, and contacts. See [functions](/adaptors/packages/whatsapp-docs) for examples of how to use this adaptor to call the API. + +In addition, WhatsApp Business supports [Webhooks](https://developers.facebook.com/docs/whatsapp/cloud-api/webhooks/payload-examples) that deliver inbound messages and delivery status updates in real time. These can be consumed by OpenFn workflows via a [webhook event trigger](/documentation/build/triggers#webhook-event-triggers) 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](https://developers.facebook.com/docs/whatsapp/cloud-api/get-started) for detailed guidance. + +OpenFn users can use the `whatsapp` credential type when [creating a credential](/documentation/manage-projects/manage-credentials) 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](/adaptors/packages/whatsapp-configuration-schema)): + +```json +{ + "baseUrl": "https://graph.facebook.com/v21.0", + "token": "EAAJZC...your_long_lived_access_token", + "phoneNumberId": "123456789012345", + "wabaId": "987654321098765" +} + +``` + +## Helpful Links + +- WhatsApp Business API documentation: https://developers.facebook.com/docs/whatsapp/api +- Cloud API Get Started guide: https://developers.facebook.com/docs/whatsapp/cloud-api/get-started +- Webhook payload examples: https://developers.facebook.com/docs/whatsapp/cloud-api/webhooks/payload-examples From ebd7c00f82e5c0d072a6d846eb0797098b8c299c Mon Sep 17 00:00:00 2001 From: Pius Kariuki <39379012+PiusKariuki@users.noreply.github.com> Date: Wed, 27 Aug 2025 11:11:45 +0300 Subject: [PATCH 2/3] Changed the property name for the bearer token to reflect what is in the config schema --- adaptors/whatsapp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adaptors/whatsapp.md b/adaptors/whatsapp.md index e249f2a4d0e..5efb89296b9 100644 --- a/adaptors/whatsapp.md +++ b/adaptors/whatsapp.md @@ -27,7 +27,7 @@ If working locally or if using a `Raw JSON` credential type in OpenFn, your conf ```json { "baseUrl": "https://graph.facebook.com/v21.0", - "token": "EAAJZC...your_long_lived_access_token", + "apiToken": "EAAJZC...your_long_lived_access_token", "phoneNumberId": "123456789012345", "wabaId": "987654321098765" } From a93b2d77476fefeec15d0bcd4437cc37f8eb9a39 Mon Sep 17 00:00:00 2001 From: Pius Kariuki <39379012+PiusKariuki@users.noreply.github.com> Date: Wed, 27 Aug 2025 11:13:45 +0300 Subject: [PATCH 3/3] Changed the link to the correct WhatsApp business API page --- adaptors/whatsapp.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adaptors/whatsapp.md b/adaptors/whatsapp.md index 5efb89296b9..934ad5a0a76 100644 --- a/adaptors/whatsapp.md +++ b/adaptors/whatsapp.md @@ -10,7 +10,7 @@ This adaptor allows OpenFn users to integrate workflows with WhatsApp Business C ## Integration Options -The WhatsApp Business API provides a [REST API](https://developers.facebook.com/docs/whatsapp/api) to manage message sending, conversations, and contacts. See [functions](/adaptors/packages/whatsapp-docs) for examples of how to use this adaptor to call the API. +The WhatsApp Business API provides a [REST API](https://developers.facebook.com/docs/whatsapp) to manage message sending, conversations, and contacts. See [functions](/adaptors/packages/whatsapp-docs) for examples of how to use this adaptor to call the API. In addition, WhatsApp Business supports [Webhooks](https://developers.facebook.com/docs/whatsapp/cloud-api/webhooks/payload-examples) that deliver inbound messages and delivery status updates in real time. These can be consumed by OpenFn workflows via a [webhook event trigger](/documentation/build/triggers#webhook-event-triggers) when customers send messages. @@ -36,6 +36,6 @@ If working locally or if using a `Raw JSON` credential type in OpenFn, your conf ## Helpful Links -- WhatsApp Business API documentation: https://developers.facebook.com/docs/whatsapp/api +- WhatsApp Business API documentation: https://developers.facebook.com/docs/whatsapp - Cloud API Get Started guide: https://developers.facebook.com/docs/whatsapp/cloud-api/get-started - Webhook payload examples: https://developers.facebook.com/docs/whatsapp/cloud-api/webhooks/payload-examples