Workflows
Learn what workflows are and how they work in Novu.
In Novu, a workflow is the blueprint that defines the end-to-end process for delivering a notification to one or more subscribers.
It acts as the central logic layer for routing messages across different channels and controlling what notification to send, when to send it and through which channels they are sent.
You can think of a workflow as a CI/CD pipeline for notifications or an assembly line:
- The event enters at the start.
- The logic defines how it moves through conditions, waits, and transformations.
- Each step performs a specific action.
- At the end, the user receives one or more messages based on the outcome.
Workflows can be simple, for example, “when a user signs up, send them a welcome email.” Or complex, such as:
- When a payment fails, wait 30 minutes, check the user type, then send an email and an in-app message.
- If there’s no response in 24 hours, follow up with an SMS message.
How the workflow is built
A workflow in Novu is built as a sequence of steps, each representing a distinct action or delivery mechanism. These steps are the building blocks of your notification logic. They determine what happens, when it happens, and how the message is sent to the user.
Each workflow begins with a trigger, which represents an event in your system. This trigger is used to initiate the notification logic associated with the workflow.
Once triggered, the event flows through the steps you’ve defined. These steps can include message delivery actions, delays, conditional branches, or logic to group similar events. The goal is to ensure that each subscriber receives the right message, at the right time, through the most appropriate channel.
Steps in a workflow
Steps are modular and executed in sequence or parallel, depending on how they’re configured. Each step either delivers a message, such as an email or push notification, or controls how and when messages are delivered.
Steps fall into three categories:
- Channel steps: These send messages via a supported delivery channel such as email, SMS, in-app, push, or chat.
- Action steps: These apply logic or control flow to shape how the notification behaves. For example, they can delay a message or group multiple events into a single digest.
- Custom steps: These execute custom logic and persist the result for use in subsequent steps.
Each step runs independently, meaning if one fails, others can still proceed. This makes workflows fault-tolerant by design.
Workflow behavior and execution
Each workflow is designed to be fault-tolerant and modular. Because each step runs independently, a failure in one step does not block the execution of others. This makes workflows resilient, adaptable and easy to extend as your needs grow, especially in multi-channel notification strategies.
Workflows also support conditional logic, allowing different paths to be followed based on subscriber data or previous step outcomes. This enables personalized and context-aware notifications, for example, skipping an SMS if the in-app message has already been seen.
Workflow structure and reusability
Each workflow is uniquely identified by an immutable identifier, which ensures consistent references across environments and systems. This identifier is used when triggering workflows and remains stable even if the workflow name or configuration changes.
Workflows are also reusable. The same workflow can be triggered from multiple places in your application, with dynamic data shaping its behavior. This reduces duplication and makes it easier to maintain consistent notification logic across your product.
Visual and configurable
Workflows can be defined using Novu’s visual editor or API, which allows teams to build and test notification flows with and without writing orchestration code. Each step is represented as a node in the editor, making the full pipeline easy to understand and modify.