SMS Providers Integration

Configure and manage SMS notification providers like Twilio, Nexmo, and others with Novu's notification infrastructure.

Novu makes SMS notifications simple, scalable, and reliable, enabling seamless integration with your communication stack. Whether you're sending OTPs, updates, or transactional messages, Novu ensures your SMS notifications are delivered efficiently and effectively.

With the SMS channel, you can:

  • Switch Providers Effortlessly: Integrate popular services like Twilio, Nexmo, or a custom provider
  • Deliver at Scale: Handle high-volume messaging with confidence
  • Customize and Track: Tailor SMS content dynamically and monitor delivery status in real time

Key Features

  • Dynamic Messaging: Inject user-specific data into messages for personalization
  • Multi-Provider Support: Switch or combine providers to maximize reliability
  • Delivery Insights: Track message delivery, failures, and user engagement
  • Fallback Mechanisms: Ensure reliable messaging with backup providers
  • Template Management: Simplify content creation with reusable SMS templates
  • Streamlined API Integration: Easily connect your backend for automated messaging workflows

Common Use Cases

  • Transactional Notifications: Send OTPs, receipts, or order updates instantly
  • Marketing Campaigns: Deliver promotional offers and updates to your audience
  • Critical Alerts: Notify users of urgent events, like security breaches or system outages
  • Reminders and Scheduling: Automate reminders for appointments, events, or deadlines

Sending SMS overrides

The overrides field supports a sms property and from, to, content field overrides. This allows you to send a message to a different recipient, from a different sender, or with a different content.

import { Novu } from '@novu/node';
 
const novu = new Novu('<NOVU_SECRET_KEY>');
 
novu.trigger('<WORKFLOW_TRIGGER_IDENTIFIER>', {
  to: {
    subscriberId: '<SUBSCRIBER_ID>',
  },
  overrides: {
    sms: {
      to: '+123012345678',
      from: 'Novu Team',
      content: 'This SMS message is from overrides',
    },
  },
});

Using different SMS integration

In Novu integration store, multiple SMS channel type provider integrations can be active at the same time. But only one provider integration can be primary at a time. This primary integration will be used as a provider to deliver the SMS by default. If you want to use a different active provider integration then you can use the integrationIdentifier sms overrides field.

If there are 4 active SMS integrations with these identifiers:-

  1. twilio-abcdef
  2. twilio-ghijkl
  3. firetext-abcdef
  4. infobip-abcdef

Here, if twilio-abcdef is primary integration and you want to use infobip-abcdef with this trigger then you can use integrationIdentifier sms overrides field as below:-

import { Novu } from '@novu/node';
 
const novu = new Novu('<NOVU_SECRET_KEY>');
 
novu.trigger('<WORKFLOW_TRIGGER_IDENTIFIER>', { to: { subscriberId: '<SUBSCRIBER_ID>', }, overrides: { sms: { integrationIdentifier: 'infobip-abcdef', }, }, });

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 errors and reason for these errors while sending sms messages using Novu.

  1. Subscriber does not have a configured channel.
    • if the from field is missing / null / undefined.

On this page