1
Set up your local environment
Start local development by running:2
3
Add the NovuModule to your application
The
NovuModule is a NestJS module that registers the Novu Endpoint in your application.The following example does not support NestJS dependency injection. If you need to @Injectable dependencies in your workflow definition, see Advanced Usage.src/app.module.ts
5
6
7
- Learn about Workflow Controls to expose no-code editing capabilities
- Explore different Channel Steps like Email, SMS, Push, and more
- Set up Action Steps like Delay and Digest
- Check out our React Email integration for building beautiful email templates
Advanced Usage (Dependency Injection)
If you need to inject dependencies into your workflow definition, you can use theregisterAsync method.
Add the NovuModule using the registerAsync method to your AppModule.
src/app.module.ts
UserService is available below with hardcoded values, but in a real-world application you might use a database or an external API to fetch the user’s name.
src/user.service.ts
NotificationService to use the injected UserService.
src/notification.service.ts