๐ฅ The open-source notification infrastructure with fully functional embedded notification center ๐๐๐
Explore the docs ยป
Report Bug
ยท
Request Feature
ยท
Join Our Discord
ยท
Roadmap
ยท
X
ยท
Notifications Directory
Available in: Node.js ยท PHP ยท Go ยท Ruby ยท Kotlin ยท Elixir ยท Rust ยท Python ยท Java
Novu provides a unified API that makes it simple to send notifications through multiple channels, including In-App, Push, Email, SMS, and Chat. With Novu, you can create custom workflows and define conditions for each channel, ensuring that your notifications are delivered in the most effective way possible.
We are excited to launch the complete Novu API and admin panel. Do you want to give it a test before the official release? Here is how:
npx novu init
After setting up your account using the cloud or docker version, you can trigger the API using the @novu/node
package.
For API documentation and reference, please visit [Novu API Reference] (https://docs.novu.co/api-reference/events/trigger-event?utm_campaign=github-readme).
To get started with the Node.js package, you can install it using npm:
npm install @novu/node
import { Novu } from '@novu/node';
const novu = new Novu(process.env.NOVU_API_KEY);
await novu.trigger('<TRIGGER_NAME>', {
to: [
{
subscriberId: '<UNIQUE_IDENTIFIER>',
email: '[email protected]',
firstName: 'John',
lastName: 'Doe',
},
],
payload: {
name: 'Hello World',
organization: {
logo: 'https://happycorp.com/logo.png',
},
},
});
Create notification workflows right from your IDE and integrate with MJML/React Email/Maizzle and others
client.workflow('comment-on-post', async ({step, subscriber}) => {
const inAppResponse = await step.inApp('in-app-step', async (inputs) => {
return {
// body: renderReactComponent(inputs)
};
}, {
inputs: {
// ...JSON Schema or ZOD/Ajv/Class Validators definition
}
});
// Novu Worker Engine will manage the state and durability of each step in isolation
const {digestedEvents} = await step.digest('1 day');
await step.email('email-step', async () => {
return {
subject: 'E-mail Subject',
body: renderReactEmail(<ReactEmailComponent events={digestedEvents} />);
}
}, {
// Step-level inputs defined in code and controlled in the novu Cloud UI by a Non-Technical Team member
inputs: {
// ...JSON Schema
},
providers: {
sendgrid: async (inputs) => {
// Echo runs as part of your application, so you have access to your database or resources
return {
to: email,
ipPoolName: 'custom-pool'
};
}
},
skip: () => {
// Write custom skip logic
return inAppResponse.seen || subscriber.isOnline;
}
});
// Define your workflow trigger payload using json schema and custom validation;
}, {
dataSchema: {
// ...JSON Schema
}
});
Using the Novu API and admin panel, you can easily add a real-time notification center to your web app without building it yourself. You can use our React / Vue / Angular components or an iframe embed, as well as a Web component.
Read more about how to add a notification center to your app with the Novu API here
Novu provides a single API to manage providers across multiple channels with a simple-to-use interface.
Before you begin coding and collaborating, please read our Code of Conduct thoroughly to understand the standards (that you are required to adhere to) for community engagement. As part of our open-source community, we hold ourselves and other contributors to a high standard of communication. As a participant and contributor to this project, you agree to abide by our Code of Conduct.
We are more than happy to help you. If you are getting any errors or facing problems while working on this project, join our Discord server and ask for help. We are open to discussing anything related to the project.
Novu is licensed under the MIT License - see the LICENSE file for details.
Thanks a lot for spending your time helping Novu grow. Keep rocking ๐ฅ