Before you can start integrating Novu into your application, you need to create a Novu account and set up a new workflow in the Novu Dashboard. This guide walks you through those steps.

1

Create a Novu account

Create a new account on Novu Cloud or sign in if you already have an account.

2

Add the Novu SDK into your backend

Our SDKs support most major programming languages, making it easy to get started. Is your preferred language missing? Reach out to us!

npm install @novu/node
3

Configure environment variables

To start, set the NOVU_API_KEY environment variable in your application.
You can find your public and secret API keys in the Developer section of the Novu dashboard. Since this step is for backend integration, be sure to use the secret key.

For security, always define your API key as an environment variable and avoid committing it to source control.

NOVU_API_KEY= "example_key_abcdefg1234567890"
4

Build a workflow

Navigate through the toggles to create your first custom workflow.

5

Trigger the workflow

Each workflow is created with a unique identifier that can be used to trigger the workflow, visit the Trigger page to view the trigger instructions.

Each trigger consists of 3 main parts:

  • Workflow identifier: The unique identifier of the workflow to trigger.
  • Subscriber ID: The unique identifier of the subscriber to trigger the workflow for, this can be a user id, email or any unique identifier.
  • Payload: The payload to pass to the workflow, this is optional and can be used to pass additional information to the workflow.

In this example, we’re using the Node.js SDK to trigger the workflow. But the same can be done with any of the SDKs.

Add the trigger snippet to your backend and call the trigger function with the Workflow identifier, Subscriber ID and Payload.

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

const novu = new Novu(process.env['NOVU_SECRET_KEY']);

novu.trigger('test', { // Workflow Identifier
  to: {
    subscriberId: '625f3fe55a55980017dd63fd' // Subscriber ID
  },
  payload: { // Payload
    task_id: {
      title: '{{payload.task_id.title}}',
      dueDate: '{{payload.task_id.dueDate}}',
      url: '{{payload.task_id.url}}'
    }
  }
});

Execute the trigger call from your backend.

If you have the In-app channel step in your workflow, you should see the notification in the Inbox section of the Novu dashboard.

6

Promote to production

Novu users logically separated environments to control the roll-out of your notifications. When you’re happy with the way your workflows work and look, you just need to promote them to production to start sending notifications to your real users.

7

Join the community

If you have any questions or run into issues as you build with our product, we hope you’ll let us know! Email us at support@novu.co, or join our Discord community and we’ll be more than happy to assist you.

Now that you triggered your first workflow, learn more about the advanced features and concepts of Novu.