What’s new in Novu 0.20?
TL;DR: All you need to know about the latest Novu 0.20.0 release. Global User Preferences, Integrations conditions, Digest and delay filters and more!
0.20 Release Updates
We're thrilled to announce the newest features in our most recent release. Let's get started and explore what's waiting for you!
Global Channel Preferences for Subscribers API
It's now possible to set subscriber preferences globally for either a particular channel or all channels via API.
I'm really stoked about this because before now it was only available per workflow, /:subscriberId/preferences/:templateId
With these API URLs, you can fetch and update global subscriber preferences.
/subscribers/:subscriberid/preference
- Update a subscriber preference globally./subscribers/:subscriberid/preferences/global
- Fetch a subscriber preference globally.
Note: These methods are also available in the NodeJS SDK. They will be available in other language SDKs very soon.
If you're using the Headless service and Notification Center Widgets, you can set or fetch via the following APIs:
widgets/preferences
- PATCH : Update subscriber preferences globally
{
"enabled": true,
"preferences": [
{
"type": "in_app",
"enabled": true
},
{
"type": "email",
"enabled": false
}
]
}
widgets/preferences/global
- GET : Fetch subscriber preferences globally.
The exposed methods from the widgets are:
fetchUserGlobalPrereferences
updateUserGlobalPreferences
Note: If a workflow is marked as critical, the subscriber global preferences will be ignored, and notifications will be sent.
Filters Usage in Digest and Delay Nodes
Users can now add filters to the digest and delay nodes inside the workflow editor to dynamically control if a digest should be used or not.
Digest Node: Adding filter
Delay Node: Adding filter
Improved Error Messages In The Workflow Editor
We have improved the error icons and states for each node in the workflow, when no provider is connected or not configured.
SMS & Email Custom Data Overrides
We now support adding custom data in email overrides as shown below:
import { Novu } from '@novu/node';
const novu = new Novu('<NOVU_API_KEY>');
await novu.subscribers.trigger("workflowIdentifier", {
to: "subscriberId",
payload: {
customKey: "customValue",
},
overrides: {
email: {
from: "support@novu.co",
// customData will work only for sendgrid
customData: {
"customKey": "customValue"
}
}
}
}
Email Custom Data overrides
Note: This works for Sendgrid only at the moment.
You can override sms values via the code below.
...
...
await novu.subscribers.trigger("workflowIdentifier", {
to: "subscriberId",
payload: {
customKey: "customValue",
},
overrides: {
sms: {
to: "<insert-phone-number>",
content: "<insert-content>"
}
}
}
SMS Overrides
Enabling The Addition of Conditions to Integrations
Users can now create conditions for the channel integrations to be executed for specific tenants only.
In the image above, you can add the condition (to an integration) to state that the integration should be used if the tenant identifier used in trigger matches the tenant identifier set here.
Note: The integrations are the provider instances on the Integration store dashboard.
When Novu runs a trigger code with a tenant Identifier attached to it like so:
import { Novu } from '@novu/node';
const novu = new Novu(process.env.NOVU_API_KEY);
await novu.trigger('<WORKFLOW_TRIGGER_ID>',
{
to: {
subscriberId: '<UNIQUE_SUBSCRIBER_IDENTIFIER>',
email: 'john@doemail.com',
},
tenant: "tenantIdentifier"
}
);
..Novu runs checks on the integrations in the Integration store to determine which integration matches to be used to send the notification based on any condition that has been set. If nothing was set, it defaults to the primary provider set for the channel used in the workflow.
Mailtrap Email Provider Integration
Now, you can use the Mailtrap Email provider on Novu.
Clicksend SMS Provider Integration
Now, you can use the Clicksend SMS provider on Novu.
All Changes
- refactor: replace node-apns library with parse implementation by @scopsy in #4085
- chore: upgrade mongoose version to 7 by @scopsy in #4106
- feat: init git submodule by @djabarovgeorge in #4049
- Nv 2781 move auth logic to application generic by @djabarovgeorge in #4064
- feat: add external oauth module by @djabarovgeorge in #4067
- chore: fix typo in spf.py by @eltociear in #4083
- Docs overhaul by @sumitsaurabh927 in #3835
- fix: unseen count default by @djabarovgeorge in #4082
- Fix unseen count by @djabarovgeorge in #4084
- Fix plunk missing square logo by @michaldziuba03 in #4087
- fix: unread request by @djabarovgeorge in #4088
- chore: fix typos by @omahs in #4089
- fix: so closing x is in the right place by @davidsoderberg in #4092
- Nv 2679 reusable conditions component by @ainouzgali in #4095
- chore: upgrade vite by @scopsy in #4090
- NV-2765 - 🐛 Bug Report: delay icon is not aligned with other steps icon by @gitstart in #4068
- Nv 2764 e2e tests by @djabarovgeorge in #4094
- fix: missing data prop in the compile payload by @ainouzgali in #4114
- Add ES i18n translations by @luisdoniad in #4110
- fix: select integration with condtions by @davidsoderberg in #4115
- refactor: conditions component by @ainouzgali in #4105
- feat: add nodejs sdk methods in readme by @jainpawan21 in #4047
- fix(ci): inbound mail pipeline indent by @p-fernandez in #4122
- Add Staging Web Pipeline by @Cliftonz in #4108
- Build submodule package by branch by @djabarovgeorge in #4121
- fix: angular version by @sr-26 in #4134
- add volume claim to mongodb deployment by @ahmadzana in #4135
- feat: add missing endpoints by @BiswaViraj in #4103
- fix: run rename by @djabarovgeorge in #4139
- Fix Inbound Mail Deployment by @djabarovgeorge in #4143
- Nv 2826 investigate failing digest tests by @davidsoderberg in #4140
- fix(app-generic): remove in-memory stranded log by @p-fernandez in #4124
- feat: add custom data in email overrides by @jainpawan21 in #4147
- chore(web): eslint react hooks part 3 by @LetItRock in #4037
- chore(deps): bump word-wrap from 1.2.3 to 1.2.5 by @dependabot in #4104
- chore: upgrade storybook by @scopsy in #4166
- Catch unexpected error while trigger event by @djabarovgeorge in #4169
- Throw exception on subscriber id as array by @djabarovgeorge in #4170
- fix: feed duplication by @sr-26 in #4130
- Correct Env Variable for Completed Cron Id health check by @Cliftonz in #4179
- Change Completed Metric Job to only run once a minute by @Cliftonz in #4182
- docs: fix link to docs by @sumitsaurabh927 in #4189
- fix: bad request for credentials by @sr-26 in #4131
- fix(web): product lead by @LetItRock in #4161
- fix: change docs url by @jainpawan21 in #4199
- Remove duplicate mention of SNS in SMS providers by @Parvezkhan0 in #4197
- feat(worker): refactor get digest events flow by @p-fernandez in #4200
- feat(api): create trigger event status enum by @p-fernandez in #4202
- fix(web): add missing injected web env vars by @xarlybovi in #4162
- fix(app-generic): proper naming for the standard worker and worker svc by @p-fernandez in #4212
- chore: remove unsued agenda package by @scopsy in #4213
- chore: remove unused docs project by @scopsy in #4215
- feat(worker): add trigger-handler queue worker for old instance redis by @p-fernandez in #4214
- fix(worker): addded some logs by @p-fernandez in #4216
- Improve Docs for Hacktoberfest by @unicodeveloper in #4217
- NV-2473 - data field is not added in case of inline of trigger by @gitstart in #3987
- feat: allow variables in sender name field of email editor by @mahendraHegde in #4184
- chore: Replace deprecated command with environment file by @jongwooo in #4208
- chore: remove unused graphql by @scopsy in #4220
- chore: remove unused testing lib by @scopsy in #4222
- chore: remove unused packages by @scopsy in #4226
- Add context to inbound email parse logger by @djabarovgeorge in #4145
- refactor: replace cp-cli with ncp by @scopsy in #4230
- feat: add support for sms overrides by @mahendraHegde in #4168
- Add markNotificationsAs by @dimooooon322 in #4228
- feat: add templateid support for sendgrid by @jainpawan21 in #4209
- Display Novu Version to the WEB UI for self-hosted users by @pedrobruneli in #4241
- fix(api): malformed filters in messages throw errors by @p-fernandez in #4308
- docs: Updated node version in CONTRIBUTING.md by @Kise07 in #4310
- add "name" property in nodemailer smtpTransportOptions to support hos… by @mainadennis in #4316
- chore(widget): use react-app-rewired instead of craco by @LetItRock in #4318
- FIX Typos and spelling corrections by @brianteeman in #4353
- docs: Fixed-hyperlink-for-deploying-to-kubernetes by @Shiva1406 in #4273
- Feature/implement hidden button by @pedrobruneli in #4265
- chore: add Elixir SDK to hacktoberfest list by @btkostner in #4360
- Update CONTRIBUTING.md by @gitgoap in #4312
- fix: fixed react flow link by @govardhanshah456 in #4302
- fix: add missing nodemailer types by @scopsy in #4393
- fix/docs: Add missing provider links in README by @nick-w-nick in #4390
- feat: add newrelic custom attributes by @scopsy in #4300
- feat: added RustSDK to README.md file by @deanurag in #4405
- fix: Fixed switching the organization the branding information is refetched by @vishalkhoje in #4297
- Allow fetching of no level preferences by @BiswaViraj in #4420
- chore: upgrade zod version to latest by @scopsy in #4423
- fix(button-variables): button link variables not showing to user in email message editor by @rockingrohit9639 in #4433
- FIX updated 'Run Novu Locally' link in README.md file by @bibaswan7 in #4355
- chore: fix typo in active-jobs-metric.service.ts by @eltociear in #4324
- @novu/node: Add transaction id to broadcast payload options by @RtiM0 in #3464
- fix(web): add missing square logo for sendchamp by @michaldziuba03 in #4456
- Fix send message uuuid by @scopsy in #4459
- refactor: map subscribers in worker part by @djabarovgeorge in #4205
- fix: tenant fetch by id by @djabarovgeorge in #4282
- feat: fan-out subscriber processing by @djabarovgeorge in #4225
- feat: export types/interfaces from headless servive by @BiswaViraj in #4441
- feat(api): Add Access-Control-Max-Age response header by @rifont in #4429
- feat(dal): Configure minimum connection pool size by env var by @dmgarland in #4073
- 0.20 patch - fix bulk options by @djabarovgeorge in #4477
- refactor: refactored add digest job usecase by @scopsy in #4158
- fix: cors issue for iframe by @davidsoderberg in #4482
- added API reference docs by @krishvsoni in #4486
- feat(provider): clicksend sms provider addition by @parveshsaini in #4473
- feat(worker): handle different push flows with better exec details by @p-fernandez in #4495
- feat(providers): improve expo response management and multi device token by @p-fernandez in #4508
New Contributors
- @omahs made their first contribution in #4089
- @luisdoniad made their first contribution in #4110
- @sr-26 made their first contribution in #4134
- @ahmadzana made their first contribution in #4135
- @Parvezkhan0 made their first contribution in #4197
- @xarlybovi made their first contribution in #4162
- @jongwooo made their first contribution in #4208
- @dimooooon322 made their first contribution in #4228
- @pedrobruneli made their first contribution in #4241
- @Kise07 made their first contribution in #4310
- @mainadennis made their first contribution in #4316
- @brianteeman made their first contribution in #4353
- @Shiva1406 made their first contribution in #4273
- @btkostner made their first contribution in #4360
- @gitgoap made their first contribution in #4312
- @govardhanshah456 made their first contribution in #4302
- @deanurag made their first contribution in #4405
- @vishalkhoje made their first contribution in #4297
- @piyushgarg-dev made their first contribution in #4237
- @bibaswan7 made their first contribution in #4355
- @rifont made their first contribution in #4429
- @dmgarland made their first contribution in #4073
- @parveshsaini made their first contribution in #4473
Full Changelog: v0.19.0...v0.20.0