Messaging service
The WhatsApp integration connects a WhatsApp Business number via the Meta Cloud API — send text and template messages, receive inbound messages forwarded to your own webhook, and expose delivery-quality and messaging-limit metrics.
WhatsApp is one of the Messaging service integrations. It has a Dreambase webhook and an inbound route:
/whatsapp/webhook/whatsapp/incomingGET verify handshake)What it does
On DEPLOYMENT_CREATEDthe service verifies the credentials against the number's Graph API endpoint and publishes the connection details — accessToken, phoneNumberId, apiUrl, forwardUrl, and an incomingWebhookUrl — back to Dreambase as outputs. Register the incomingWebhookUrl as the Cloud API webhook callback (with your verify token) to receive inbound messages.
Inputs
| Field | Required | Description |
|---|---|---|
accessToken | yes | Cloud API access token. Supports {{env.MY_SECRET}}. |
phoneNumberId | yes | The WhatsApp Business phone number ID. |
forwardUrl | yes | Where inbound messages are forwarded. |
verifyToken | no | Token to verify the inbound webhook with Meta (set the same value in Meta). |
graphVersion | no | Meta Graph API version (default v21.0). |
forwardSecret | no | Bearer token sent on forwarded requests so your endpoint can verify the source. |
Outputs
accessToken,phoneNumberId,apiUrl— for other services to send with.forwardUrl,verifyToken— the inbound configuration.incomingWebhookUrl— register this as the WhatsApp webhook callback in Meta.
Functions
sendMessage— send a text message (to,text).sendTemplate— send a pre-approved template (to,template, optionallanguage,components). Required to initiate conversations outside the 24-hour window.markRead— mark an inbound message read (messageId).
Metrics
On METRIC_UPDATE the service reports quality_rating (GREEN=2, YELLOW=1, RED=0) and messaging_limit (business-initiated conversations per day), read from the number. Health checks probe GET /{phoneNumberId}.
Templates outside the 24-hour window
WhatsApp only allows free-form messages within 24 hours of the user's last message. To start a conversation, usesendTemplate with a pre-approved template.Events it handles
WEBHOOK_CHALLENGE— verify the webhook endpoint.HEALTH_CHECK— probe the number's Graph API endpoint.METRIC_UPDATE— report quality and messaging-limit metrics.DEPLOYMENT_CREATED— verify credentials and publish outputs.DEPLOYMENT_DELETED— stop tracking the connection.FUNCTION_CALL— run a named function.