Updated on November 10, 2026
To use the official WhatsApp Business API in Bubble.io, you set up the API Connector with the token in a header marked private, create a POST call used as an Action to send messages and templates, and expose a public backend workflow (API workflow) to receive the webhook with messages and statuses. Bubble makes the calls from its own server, so the token never reaches the browser.
Below is the field-by-field setup, how to build the send workflow, how to receive events with “Detect request data” and where Bubble’s limits call for an intermediate piece.
What you need
- A number connected to the official WhatsApp API and an access token (from Meta or your provider).
- At least one approved template, because messages outside the 24-hour window can only go out as templates.
- A Bubble app with access to the API Connector plugin and the Backend workflows tab.
Step 1: create the API in the API Connector
According to the Bubble manual, each external service becomes a collection that holds its authentication and calls; the authentication method applies to every call in the collection. Set it up like this:
| Field | Value |
|---|---|
| API Name | WhatsApp |
| Authentication | Private key in header |
| Key name | Authorization |
| Key value | Bearer YOUR_TOKEN |
| Development key value | Optional: a test token, if you have one |
| Shared header | Content-Type: application/json |
The API Connector authentication page lists the available options and allows a separate key for development. Avoid the None or self-handled mode for storing the token: the manual itself warns that in this mode, values marked private are exposed and anyone can read them, even without logging in. According to the API Connector security page, calls go through Bubble’s server by default, and private values stay there.
Want to try it while you read? Create a Vectalk account and send your first message through the official API. Create free account →
Step 2: the template send call
Inside the collection, add a call:
- Name:
send_template - Use as:
Action(the adding calls page explains the choice between Data and Action; sending is an action) - Method:
POST - URL: the send endpoint. With Meta,
https://graph.facebook.com/v27.0/YOUR_PHONE_NUMBER_ID/messages, per the send messages documentation. - Body type: JSON
Body, with dynamic values marked as API Connector parameters:
{
"messaging_product": "whatsapp",
"to": "<to>",
"type": "template",
"template": {
"name": "order_confirmed",
"language": { "code": "en_US" },
"components": [
{
"type": "body",
"parameters": [
{ "type": "text", "text": "<name>" },
{ "type": "text", "text": "<order>" }
]
}
]
}
}
Bubble turns each <name> into a field the workflow fills in. Keep the template name fixed in the call, not as a parameter: that stops a misconfigured workflow from sending any template. If the text can contain quotes or line breaks (a name typed by the customer, for example), handle the value before sending it, or the JSON breaks. Include a case like that in your tests.
Before using it, click Initialize call with real test values (your own number and an approved template). The manual says every call needs to be initialized before it can be used in your app. If the test works, the response includes messages[0].id, the wamid. Afterwards, clear the default values: according to the security page, default initialization values become part of your app’s code and can be viewed on the user’s device.
Also check Include errors in response and allow workflow actions to continue if you want to handle errors in the workflow itself (log the failure, alert the team) instead of stopping everything.
Step 3: trigger the send from a workflow
For transactional messages (order confirmed, appointment reminder), the safest pattern is:
- An app event (for example, “order created”) schedules a backend workflow
send_whatsapp_orderwith the order ID. - The backend workflow looks up the phone and name in Bubble’s database.
- The
WhatsApp - send_templateaction sends, with<to>,<name>and<order>filled in from the order. - The workflow stores the returned
wamidin a thingWhatsAppMessage, with an initial status ofaccepted.
Why a backend workflow instead of a front-end button? Because then the recipient and the content come from the database, not from a field the user can change. It’s the same least-privilege idea the manual recommends: the server receives only what it needs.
The number goes as digits only with the country code (for example, 5584999999999, a Brazilian mobile number). Outside the 24-hour window, only approved templates are delivered; see the WhatsApp 24-hour window and, for header media and buttons, how to send a template through the API.
Step 4: receive messages and statuses with a backend workflow
To receive, you expose an API workflow. According to the creating API workflows page:
- Activate the Workflow API in the app’s API settings.
- Create the backend workflow
whatsapp_webhookand check Expose as public API workflow. - Check This workflow can be run without authentication, because the caller is an external system. The manual warns that this lets anyone trigger the workflow; step 5 deals with that.
- Under Parameter definition, choose Detect request data and click Detect data. Then send a real event (a message to the number) so Bubble learns the format.
The URL follows the pattern on the endpoints page: https://yourapp.bubbleapps.io/version-test/api/1.1/wf/whatsapp_webhook in development and without version-test in production (or with your own domain). Don’t forget to update the URL registered with the provider when you go live.
The payload uses Meta’s format: entry[].changes[].value, with messages[] for incoming messages and statuses[] for sent, delivered, read and failed. Examples of each type are in webhook payload examples and the status cycle in message status via webhook. In the workflow:
- If there’s a message, create a
ReceivedMessageonly when no other one with the samewamidexists. Meta retries deliveries without a200for up to 7 days and they may arrive duplicated, according to the webhooks overview. - If there’s a status, update the
WhatsAppMessagewith the matchingwamid. - Leave heavy processing (calling AI, sending email) to another scheduled backend workflow, so the webhook responds quickly.
Step 5: protecting the webhook and Bubble’s limits
A public endpoint without authentication needs some proof of origin. Meta signs each event with X-Hub-Signature-256, an HMAC-SHA256 of the raw body with the app secret, and verifies the endpoint with a GET that expects the bare hub.challenge back, according to the webhook endpoint page. The Bubble documentation we reviewed doesn’t describe how to compute an HMAC of the raw body inside a backend workflow, or how to return the challenge as plain text.
In practice, there are two ways out:
| Situation | How to protect it |
|---|---|
| Webhook from a provider that forwards events | A secret in the registered URL (?key=...) and an Only when condition that key equals the stored value |
| Webhook directly from Meta | An intermediate function (Edge Function, Cloudflare Worker, n8n) handles verification and the signature and forwards to Bubble with the secret |
The intermediate-function pattern is described in serverless WhatsApp webhook, and the signature calculation in how to validate the webhook signature. If you’d rather orchestrate everything outside Bubble, n8n with the official WhatsApp API is an alternative.
Common mistakes
| Symptom | Likely cause | Fix |
|---|---|---|
| The action doesn’t show up in the workflow | Call configured as Data | Switch Use as to Action |
| Error when clicking Initialize call | Invalid token or template not approved | Test the same JSON in Postman; check the template status |
| Body breaks on names with quotes | Dynamic value with characters that break the JSON | Handle quotes and line breaks before sending |
| Webhook works in test and stops in production | version-test URL registered with the provider | Update the URL to the live version |
| Duplicate messages in the database | Redeliveries without a wamid check | Create the thing only if the wamid doesn’t exist |
How to do this with Vectalk
Vectalk is a proxy for the official Cloud API, so the setup is the same with a different URL. In the API Connector, use https://apis.vectalk.com.br/api/messages as the call URL and Bearer YOUR_TOKEN in the private header, with the same JSON body, as in the Vectalk quickstart. Create the token under Settings (Configurações) → API Tokens: an instance token resolves the phone_number_id on its own; an organization token (the global token) requires phone_number_id in the body, according to the authentication page.
To receive, register the backend workflow URL, with ?key=... already appended, via POST https://apis.vectalk.com.br/api/webhooks (instance_id, url, name). The Hub forwards the same payload Meta sends and expects 200 within 20 seconds, according to the webhooks documentation. It doesn’t describe a verification GET or a signature header on the forwarded request, which fits the first row of the table above; confirm the details through the contact page.
For billing, you pay the plan’s monthly fee and load a prepaid balance, and each delivered message is deducted from it, with no card registered at Meta. Vectalk has no inbox, AI or bulk messaging in its dashboard: those screens live in your Bubble app. To get started, create your account. If your app is built on Lovable, see Lovable with the official WhatsApp API.
Frequently asked questions
Is the token exposed in the browser?
Not if it’s in the header with Private key in header. Calls go through Bubble’s server, and private values stay there. Avoid the None or self-handled mode for credentials and clear default initialization values.
Can I send free text instead of a template?
Yes, by creating another call with "type": "text", but only inside the 24-hour window opened by a customer message. To start a conversation, use an approved template.
Can I receive the webhook directly from Meta in Bubble?
The problem isn’t receiving the POST, but the initial verification and the signature. If you can’t return the bare hub.challenge or validate the HMAC, use an intermediate function or a provider that forwards the events.
How do I send to a list of contacts?
With a recursive or scheduled backend workflow, one contact at a time, only to people who opted in. Respect the account’s messaging limits and sending pace; a large list calls for cost and quality planning.
Does the backend workflow need to return anything specific?
For the provider, responding 200 quickly is enough. Use the Return data from API action only if you want to return something for your own tests.
Official sources consulted on November 10, 2026: Bubble: API Connector, Bubble: API Connector authentication, Bubble: adding calls, Bubble: API Connector security, Bubble: creating API workflows, Bubble: Workflow API endpoints, Meta: send messages, Meta: create a webhook endpoint, Meta: webhooks overview, Vectalk: quickstart, Vectalk: authentication, Vectalk: webhooks.
Put your business on the official WhatsApp
Create your account, connect your number to the official API (you can keep the app with coexistence) and start serving customers and sending messages.
