DEV Community

Alex Spinov
Alex Spinov

Posted on

Novu Has a Free API — Here's How to Build a Multi-Channel Notification Infrastructure

A developer I know maintained 4 separate notification services: SendGrid for email, Twilio for SMS, Firebase for push, and a custom WebSocket server for in-app. Four services, four APIs, four billing dashboards, four sets of templates. Novu replaced all four.

What Novu Offers for Free

Novu free tier:

  • 30,000 events/month — generous for most apps
  • All channels — email, SMS, push, in-app, chat
  • Visual workflow editor — drag-and-drop notification logic
  • Template engine — Handlebars-based with preview
  • Subscriber management — user preferences built in
  • In-app notification center — drop-in React component
  • Open source — self-host for unlimited events

Quick Start

npm install @novu/node
Enter fullscreen mode Exit fullscreen mode
const { Novu } = require('@novu/node');
const novu = new Novu(process.env.NOVU_API_KEY);

// Create a subscriber
await novu.subscribers.identify('user_123', {
  email: 'alice@example.com',
  firstName: 'Alice',
  phone: '+1234567890'
});

// Trigger a notification
await novu.trigger('order-shipped', {
  to: { subscriberId: 'user_123' },
  payload: {
    orderId: 'ORD-456',
    trackingUrl: 'https://track.example.com/456',
    estimatedDelivery: 'April 2, 2026'
  }
});
Enter fullscreen mode Exit fullscreen mode

Multi-Channel Workflow

// One trigger → multiple channels (configured in dashboard)
// Workflow: order-shipped
// Step 1: In-app notification (immediate)
// Step 2: Email with tracking details
// Step 3: Wait 30 minutes
// Step 4: If not seen → SMS reminder
// Step 5: If not seen in 2 hours → Push notification

await novu.trigger('order-shipped', {
  to: { subscriberId: 'user_123' },
  payload: {
    orderId: 'ORD-789',
    items: ['Blue Widget', 'Red Gadget'],
    trackingUrl: 'https://track.example.com/789'
  },
  overrides: {
    email: { from: 'orders@yourapp.com' },
    sms: { from: '+1800YOURAPP' }
  }
});
Enter fullscreen mode Exit fullscreen mode

In-App Notification Center (React)

import { NovuProvider, PopoverNotificationCenter, NotificationBell } from '@novu/notification-center';

function App() {
  return (
    <NovuProvider
      subscriberId="user_123"
      applicationIdentifier="YOUR_APP_ID"
    >
      <PopoverNotificationCenter>
        {({ unseenCount }) => <NotificationBell unseenCount={unseenCount} />}
      </PopoverNotificationCenter>
    </NovuProvider>
  );
}
Enter fullscreen mode Exit fullscreen mode

REST API

# Trigger notification
curl -X POST 'https://api.novu.co/v1/events/trigger' \
  -H 'Authorization: ApiKey YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "welcome-email",
    "to": { "subscriberId": "user_123" },
    "payload": { "name": "Alice", "plan": "Pro" }
  }'

# Get subscriber notifications
curl 'https://api.novu.co/v1/subscribers/user_123/notifications/feed' \
  -H 'Authorization: ApiKey YOUR_API_KEY'

# Update subscriber preferences
curl -X PATCH 'https://api.novu.co/v1/subscribers/user_123/preferences' \
  -H 'Authorization: ApiKey YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "channel": { "type": "sms", "enabled": false }
  }'
Enter fullscreen mode Exit fullscreen mode

Digest / Batching

// Instead of 20 'new like' emails, send one digest
// Configure in the workflow editor:
// Step 1: Digest (batch for 1 hour)
// Step 2: Email with template:
// "You got {{step.digest.events.length}} new likes on your post"

// Each trigger adds to the digest
await novu.trigger('new-like', {
  to: { subscriberId: 'user_123' },
  payload: { likerName: 'Bob', postTitle: 'My Article' }
});
Enter fullscreen mode Exit fullscreen mode

Self-Hosted (Unlimited)

# Docker compose for self-hosting
git clone https://github.com/novuhq/novu.git
cd novu/docker
docker-compose up -d
# Access dashboard at http://localhost:4200
Enter fullscreen mode Exit fullscreen mode

Need to monitor websites and get notified of changes? Check out my web scraping actors on Apify — automated web monitoring.

Need a custom notification pipeline? Email me at spinov001@gmail.com.

Top comments (0)