DEV Community

Prosper Otemuyiwa for novu

Posted on

What's new in Novu 0.19?

TL;DR: All you need to know about the latest Novu 0.19.0 release. Multi-tenancy management, bulk subscriber creation, override layouts and more!

0.19 Release Updates

We're eager to showcase the latest features in our most recent release. Let's dive in and discover what's in store for you!

giphy (2) (1)

Multi-tenancy Management

We are stoked to let you know that you can now manage tenants from the UI (Novu’s dashboard) and the API.

tenants-management (1)

Self-hosted users need to add and turn on the IS_MULTI_TENANCY_ENABLED env flag to be able to manage tenants in their Novu installation.

Tenants Usage in Workflows as Variables

With tenants feature now generally available, there are different ways you’ll be able to use it in your app depending on your use case.

One of those ways is using it as variables in your workflows and triggers. When triggering a notification using the events trigger endpoint, you can pass in a tenant property as a parameter 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',
      firstName: 'John',
      lastName: 'Doe',
    },
    payload: {
      name: "Hello World",
      organization: {
        logo: 'https://happycorp.com/logo.png',
      },
    },
     actor: "actorId"
   tenant: "tenantIdentifier"
  }
);
Enter fullscreen mode Exit fullscreen mode

passing in tenant property when triggering a notification

The tenant can also be accessed in a workflow template like so:

{{ tenant.data.logo }}
Enter fullscreen mode Exit fullscreen mode

accessing tenant properties in a workflow

Bulk Subscriber Creation

This release also ships the wildly requested “bulk subscriber creation.” You’ll be able to create subscribers in bulk (up to 500 at once) using an API endpoint.

Note: The bulk API is limited to 500 subscribers per request.

await novu.subscribers.bulkCreate([
      {
        subscriberId: 'test-subscriber-1',
        email: 'test-user@sd.com',
        firstName: 'subscriber-1',
        lastName: 'test-1',
      },
      {
        subscriberId: 'test-subscriber-2',
        email: 'test-user-2@sd.com',
        firstName: 'subscriber-2',
        lastName: 'test-2',
      },
      {
        subscriberId: 'test-subscriber-3',
      },
    ]);
Enter fullscreen mode Exit fullscreen mode

Addition of Tags in Workflow Settings

We have added the ability to use tags in the workflow settings screen.

This change allows use cases where you need to group multiple workflows under the same tag, and then use it to filter subscriber preferences for example.

taggs-workflow-settings (1)

Allow Override layout On Trigger

To override your assigned layout during a trigger event use the layoutIdentifier property, the layout specified will be used for all emails in the context of that trigger event.

import { Novu } from '@novu/node';

const novu = new Novu('<NOVU_API_KEY>');

novu.trigger('workflow-identifier', {
  to: {
    subscriberId: '...',
  },
  payload: {
    attachments: [
      {
        file: fs.readFileSync(__dirname + '/data/test.jpeg'),
        name: 'test.jpeg',
        mime: 'image/jpg',
      },
    ],
  },
  overrides: {
    layoutIdentifier: 'your-layout-identifier',
  },
});

Enter fullscreen mode Exit fullscreen mode

Show Primary Providers on Workflow Nodes

Now you can see the primary provider of a channel in the nodes that show on the workflow editor. This gives you more context and better identification without extra clicks!

Screenshot 2023-09-11 at 16 11 03

Enhanced Workflow Nodes Misconfiguration Error

Nodes and workflows will now display mis-configured workflows on the dashboard like so:

Screenshot 2023-09-11 at 16 20 25

All Changes

You can find the full changelog on GitHub.

Supercharged Docs

We revamped and rewrote our docs to be better, faster and easily searchable.

With the new docs, you can hit the ground running with the API endpoints directly from the API reference pages.

Please explore and give us your feedback.

Conclusion

Sign up on Novu, try it out & let me know what you think about the new changes in the comments section.

If you want to contribute to OSS and make an impact, I believe it is a great place to start & build out amazing things.

Oh, remember to star the repo as well.🤩 See you in the next release! 🚀

Top comments (1)

Collapse
 
unkletayo profile image
Adetayo Akinsanya

Awesome project, glad it written in typescript, hoping to get intresting first issues to contribute with on the project.