MyGit

v0.19.0

novuhq/novu

版本发布时间: 2023-09-14 14:47:54

novuhq/novu最新发布版本:v0.24.0(2024-03-18 17:44:43)

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"
  }
);

passing in tenant property when triggering a notification

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

{{ tenant.data.logo }}

accessing tenant properties in a workflow

Bulk Subscriber Creation

This release also ships the wildly requested “bulk subscriber creation.” Starting v0.19, 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',
      },
    ]);

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',
  },
});

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

New Contributors

Full Changelog: https://github.com/novuhq/novu/compare/v0.18.0...v0.19.0

相关地址:原始地址 下载(tar) 下载(zip)

查看:2023-09-14发行的版本