docs/platform/integrations/chat/whats-app.mdx
To integrate WhatsApp Business with Novu, You will have to create a facebook developer app and obtain the necessary credentials.
<Steps> <Step title="Create a Facebook developer app"> Visit the [Facebook Developer Portal](https://developers.facebook.com/apps/) and create a new app.Select "Other" for "What do you want your app to do?" and select "Business" for "Select an app type".
</Step> <Step title="Setup WhatsApp product"> On the App Setup page, click on "Set Up" under the "WhatsApp" product. You will need to create or add a Facebook Business Account to your app. </Step> <Step title="Send a sandbox message"> Copy the following pieces and paste them in the Novu WhatsApp Business integration settings:In the to field, specify the phone number you added in the sandbox, and click on "Send Notification".
{
"subscriberId": "TEST_SUBSCRIBER_ID",
"phone": "+11111111111"
}
and in the overrides field, add the following:
{
"chat": {
"template": {
"name": "hello_world",
"language": {
"code": "en_US"
}
}
}
}
To send a notification with a template, you will need to add the following to the overrides field:
const novu = new Novu({ secretKey: "<NOVU_SECRET_KEY>" });
await novu.trigger({ workflowId: "workflowId", to: { subscriberId: "subscriberId", phone: "+11111111111", }, payload: {}, overrides: { "chat": { "template": { "name": "template_name", "language": { "code": "en_US" } } } }, });
</Tab>
<Tab title="Python">
```python
import os
import novu_py
from novu_py import Novu
with Novu(secret_key=os.getenv("NOVU_SECRET_KEY", "")) as novu:
novu.trigger(trigger_event_request_dto=novu_py.TriggerEventRequestDto(
workflow_id="workflowId",
to={"subscriber_id": "subscriberId", "phone": "+11111111111"},
payload={},
overrides={
"chat": {
"template": {
"name": "template_name",
"language": {
"code": "en_US"
}
}
}
},
))
novugo "github.com/novuhq/novu-go"
"github.com/novuhq/novu-go/models/components"
)
s := novugo.New(novugo.WithSecurity(os.Getenv("NOVU_SECRET_KEY")))
res, err := s.Trigger(context.Background(), components.TriggerEventRequestDto{ WorkflowID: "workflowId", To: components.CreateToSubscriberPayloadDto(components.SubscriberPayloadDto{ SubscriberID: "subscriberId", Phone: novugo.String("+11111111111"), }), Payload: map[string]any{}, Overrides: map[string]any{ "chat": { "template": { "name": "template_name", "language": { "code": "en_US" } } } }, }, nil)
</Tab>
<Tab title="PHP">
```php
use novu;
use novu\Models\Components;
$sdk = novu\Novu::builder()->setSecurity('<NOVU_SECRET_KEY>')->build();
$sdk->trigger(
triggerEventRequestDto: new Components\TriggerEventRequestDto(
workflowId: 'workflowId',
to: new Components\SubscriberPayloadDto(subscriberId: 'subscriberId', phone: '+11111111111'),
payload: {},
overrides: {
"chat": {
"template": {
"name": "template_name",
"language": {
"code": "en_US"
}
}
}
},
),
);
var sdk = new NovuSDK(secretKey: "<NOVU_SECRET_KEY>");
await sdk.TriggerAsync(triggerEventRequestDto: new TriggerEventRequestDto() { WorkflowId = "workflowId", To = To.CreateSubscriberPayloadDto(new SubscriberPayloadDto() { SubscriberId = "subscriberId", Phone = "+11111111111" }), Payload = {}, Overrides = { "chat": { "template": { "name": "template_name", "language": { "code": "en_US" } } } }, });
</Tab>
<Tab title="Java">
```java
import co.novu.Novu;
import co.novu.models.components.*;
Novu novu = Novu.builder().secretKey("<NOVU_SECRET_KEY>").build();
novu.trigger()
.body(TriggerEventRequestDto.builder()
.workflowId("workflowId")
.to(To2.of(SubscriberPayloadDto.builder().subscriberId("subscriberId").phone("+11111111111").build()))
.payload({})
.overrides({
"chat": {
"template": {
"name": "template_name",
"language": {
"code": "en_US"
}
}
}
})
.build())
.call();
Save a WhatsApp Business override on the Chat step when you need Cloud API message shapes beyond the plain-text step body — for example templates, interactive buttons, or media. The override is stored on the step, so it is versioned and promoted with the workflow, and every trigger sends it without changing your trigger call.
<Note> Provider content overrides in the workflow editor are rolling out gradually and may not be available on your Chat step yet. Overrides passed at trigger time work regardless. See [provider content overrides](/platform/integrations/chat#provider-content-overrides). </Note> <Steps> <Step title="Open the Chat step"> In the [Novu Dashboard](https://dashboard.novu.co), open your workflow and select the Chat step that uses the WhatsApp Business integration. </Step> <Step title="Open the WhatsApp overrides editor"> In the step editor, open the content source dropdown — it reads **Default content** until you switch it — and pick **WhatsApp Business** under **Overrides**. If WhatsApp has no override yet, use the **+** beside it to add one. </Step> <Step title="Write the override JSON"> Enter a JSON object of [WhatsApp Cloud API Message](https://developers.facebook.com/docs/whatsapp/cloud-api/reference/messages) fields. The editor autocompletes supported field names (`type`, `text`, `template`, `interactive`, media, `context`, and related bodies), validates the JSON, and flags unsupported fields. </Step> <Step title="Save the workflow"> The override applies on the next trigger. </Step> </Steps>Override values may contain Liquid templates, which Novu compiles at send time:
{
"type": "text",
"text": {
"body": "Order {{payload.orderId}} is {{payload.status}}"
}
}
For text messages, text.body is the primary content field. If your override omits it, Novu fills it with the rendered Chat step body. Recipient addressing (to) is resolved from the subscriber endpoint — prefer addressing a different subscriber when you want a different destination.
WhatsApp is a supported agent provider. Connect your WhatsApp Business account to an agent so users can message your number and get replies in the same thread - without building Meta webhook handling yourself.
<Card title="Build agents on WhatsApp" icon="bot" href="/agents"> Learn how Novu agents work, including managed and custom code agents. </Card>When WhatsApp is connected to an agent:
See agent conversations for capabilities across all providers.
| Use case | What happens |
|---|---|
| Agent conversation | The user messages your WhatsApp number and your agent replies in the same chat. |
| Workflow notification | You trigger a workflow with a Chat step and Novu sends a one-way template message to the subscriber. |