Multi-channel notification delivery for modern SaaS applications
NotiFlow is a unified notification SDK that lets you send alerts via email, SMS, push, Slack, and webhooks from a single, consistent API. No more juggling five different SDKs for five different channels.
Built for Node.js and TypeScript, NotiFlow handles retries, templating, batching, and delivery tracking out of the box โ so you can focus on building, not plumbing.
# npm npm install notiflow # yarn yarn add notiflow # pnpm pnpm add notiflow
Email, SMS, Push, Slack, and Webhooks from one unified API.
Configurable retry logic with exponential backoff on failed deliveries.
Handlebars-compatible templates with variable injection support.
Track sent, delivered, opened, and failed statuses per notification.
import { NotiFlow } from 'notiflow'; const notify = new NotiFlow({ email: { provider: 'sendgrid', apiKey: process.env.SG_API_KEY }, sms: { provider: 'twilio', sid: process.env.TW_SID, token: process.env.TW_TOKEN } }); // Send an email await notify.send({ channel: 'email', to: '[email protected]', subject: 'Your order shipped!', template: 'order-shipped', data: { orderId: 'ORD-9921', estimatedDelivery: 'Mar 15' } }); // Send an SMS await notify.send({ channel: 'sms', to: '+2348012345678', message: 'Your OTP is 482910. Valid for 5 minutes.' });
| Channel | Provider Options | Templating | Delivery Tracking |
|---|---|---|---|
| ๐ง Email | SendGrid, Mailgun, SES | โ | โ |
| ๐ฑ SMS | Twilio, Vonage, Termii | โ | โ |
| ๐ Push | FCM, APNs | โ | โ |
| ๐ฌ Slack | Slack Webhooks | โ | โ |
| ๐ Webhook | Any HTTP endpoint | โ | โ |
| Option | Type | Description |
|---|---|---|
| emailoptional | object | Email provider config. Required to send emails. |
| smsoptional | object | SMS provider config. Required to send SMS. |
| retriesoptional | number | Max retry attempts on failure. Default: 3. |
| retryDelayoptional | number | Base delay in ms between retries. Default: 1000. |
| templateDiroptional | string | Path to your templates folder. Default: ./templates. |
| onDeliveryoptional | function | Callback fired on each delivery event. |
โ ๏ธ At least one channel (email, sms, push, etc.) must be configured. Calling notify.send() for an unconfigured channel throws a ChannelNotConfiguredError.
Sends a notification on the specified channel. Returns a delivery receipt object.
{
id: "ntf_7x9abc",
channel: "email",
status: "delivered",
sentAt: "2025-03-06T10:00:00Z",
attempts: 1
}
Send multiple notifications in a single call. Processes in parallel with configurable concurrency.
const results = await notify.batch([ { channel: 'email', to: '[email protected]', subject: 'Hi A', message: 'Hello!' }, { channel: 'sms', to: '+2348011111111', message: 'Your code: 1234' }, ]); // Returns array of delivery receipts
Contributions are welcome! Please fork the repository, create a feature branch, and open a pull request. Make sure all tests pass before submitting.
git clone https://github.com/your-org/notiflow.git cd notiflow npm install npm test # Run test suite npm run build # Build TypeScript