"Action Required: Please verify your email address to continue." Engagement: "Hey firstName, your post just reached 100 likes!" 2. Push & SMS Notification Templates
When a user performs an action, you call Novu. This is the "Novu notification" trigger.
To trigger a notification, you first install the package: npm install @novu/node . Then, use the following code structure: javascript
The most immediate benefit is the single API endpoint. Instead of maintaining SDKs for five different providers, you interact only with the Novu SDK. You trigger an event, and Novu handles the routing. This drastically reduces the cognitive load on developers and minimizes the potential for bugs.
Modern users demand control. A automatically respects user preferences. If user_12345 has turned off "Email" but left "In-App" on, Novu will silently skip the email step. You don't need to write if logic.
Uses WebSockets to show new alerts instantly without refreshing.
To send these texts, you trigger a workflow using the Novu SDK. You can pass dynamic data into your templates using the javascript '@novu/node' Novu(process.env.NOVU_API_KEY); novu.trigger( 'workflow-identifier' , { to: subscriberId: 'user-123' , email: 'user@example.com' , payload: { firstName: , orderId: , senderName: Use code with caution. Copied to clipboard Key Components of a Novu Notification Inside the Open-Source Novu Notification Engine