Chat channels allow you to deliver instant, contextual messages to your subscribers via their preferred chat platform and apps.

1

Enable Chat Channel in Novu Dashboard

The Chat channel is not enabled by default. To use it, configure a provider like Slack, Discord, or others.

  1. Go to the Novu Dashboard and click “Integrations” on the left sidebar
  2. Click “Add a provider”
  3. Locate the Chat channel and select the provider you want to use and click “Next”
  4. Select for which environment you want to add the Provider
  5. (Optional) Add Conditions to activate the provider only under certain conditions, useful for tenant-based providers
  6. Click “Create”
  7. Add your Chat provider credentials:
    Each chat provider requires defferent type of credentials. There are few providers which does not require any credentials example: Discord
    • Provider-specific credentials such as API key / Auth token, Client ID, Client Secret, or password
  8. Save the configuration by clicking “Update”
2

Setup workflow with chat channel in Novu Dashboard

  1. Go to the Novu Dashboard and click “Workflows” on the left sidebar.
  2. Click the “Add a Workflow” button.
  3. Add a step and select “Chat” as the channel.
  4. Configure the Chat content:
    • Message body (e.g., {{subscriber.firstName}}, your order {{orderId}} has shipped.).
    • Dynamic placeholders for personalized content.
  5. Optionally, set fallback channels to ensure reliable delivery if Chat fails.
3

Add a workflow Trigger to your backend

Novu’s server-side SDKs make integrating Novu’s REST APIs straightforward, letting you focus on implementing workflows without dealing with repetitive code.

Server-side SDKs

4

Test and Verify Chat Channel

Ensure your Chat configuration is working correctly by testing the setup.

  1. Go to the Novu Dashboard, navigate to the “Workflows” section, and locate your configured workflow.
  2. Click “Test Workflow” and provide sample data, such as a phone number or dynamic variables.
  3. Verify delivery in the Novu Logs or your Chat provider’s dashboard.

Sending chat message

Steps to send a chat message using Novu:-

  1. Add a chat provider integration to your Novu account from the integration store. Enter credentials if required and save the integration. Follow corresponding provider documentation to get the required credentials.
  2. Create a new subscriber

Step 2 can be skipped if you already have a subscriber. You can use the subscriberId of an existing subscriber.

  1. Update the subscriber credential webhookUrl for this provider and integration.

  2. Create a new worklow or use an existing workflow. Add chat channel and write content for the message.

  3. Trigger this workflow to above subscriberId using trigger identifier

  4. Check the chat provider if message is received.

Update credential webhookUrl

import {
  Novu,
  ChatProviderIdEnum
} from '@novu/node';

const novu = new Novu("<NOVU_SECRET_KEY>");

await novu.subscribers.setCredentials('subscriberId', ChatProviderIdEnum.Slack, {
webhookUrl: "<WEBHOOK_URL>",
});

Checkout the API reference for more details.

Integration identifier is similar to Provider identifier but it is different than Provider Id. It is unique for each integration. You can find the integrationIdentifier in the integration store page.

Common errors

Common erros and reason of those errors while sending chat messages using Novu.

  1. Subscriber does not have a configured channel.
    • if the subscriber does not have credentials set up for any of the chat provider.
  2. Webhook URL for the chat channel is missing.
  3. Subscriber does not have an active integration.
    • if subscriber have credentials set but integration is either not active or deleted for this credential.
Are we missing a provider you'd like to use for SMS channel? Please consider adding a new feature request on github or help us upvoting the existing ones on our public roadmap

Was this page helpful?