Workflows
Here you learn all about workflows
A workflow holds the entire flow of steps (nodes) that are sent to the subscriber. This is where all the different channels are tied together under a single entity.
Notification template has been renamed to workflow. Previously, workflow has been referred to as notification template.
Structure
A workflow acts as the blueprint for the notifications that will be sent. The workflow encapsulates the entire flow and rules of messages that are being sent. This is where all the different channels, filters, rules and actions are tied together under a single entity.
Workflow Components
Name and Identifier
Every workflow will have a name and an identifier that are used to uniquely identify each workflow.
Trigger
The “Trigger” refers to an event or action that initiates the workflow. It signifies a call to the Novu API with a specified workflow ID, along with the necessary payload data that the workflow content will utilize.
Channels
In Novu, a channel refers to a preconfigured provider through which notifications are dispatched to recipients. In most instances within Novu, these channels utilize the credentials you provide to ensure the delivery of notifications on your behalf. The combination of these credentials and accompanying settings constitutes a configured channel.
Within the Novu framework, channels are categorized into various types, each of which is linked with at least one corresponding provider that can be tailored as needed:
- Email (examples include Sendgrid, Postmark)
- In-App (such as feeds, toasts, banners)
- Push (such as APNS, FCM)
- SMS (examples include Twilio, Telnyx)
- Chat (such as Slack, Microsoft Teams, and Discord)
- Webhook (used to send webhooks to custom channels or enable your customers to configure webhooks within your product)
Execution of Workflow Steps
Once a workflow is initiated by its trigger, the steps (and channels) within the workflow are executed in a specific sequence. This sequential execution ensures that each step is completed before the next one begins, maintaining a controlled and orderly flow of the notification process. Here’s what you need to know about this process:
-
Sequential Execution: Each channel in the workflow is activated one after the other, in the order they are listed within the workflow. This method ensures that each step is given the necessary attention and that dependencies or prerequisites of later steps are adequately met.
-
Order of Channels: The order in which channels are listed in the workflow is crucial, as it dictates the sequence of their execution. You should carefully consider the order when setting up your workflows to align with your notification strategy.
Sequential execution provides a predictable and reliable workflow process, ensuring that messages are sent out in an organized manner and that each step’s output potentially influences the subsequent ones.
Workflow can be canceled only using DELETE /events/cancel api
Workflow Groups
Workflow groups are used to categorize workflows based on their purpose or function. This grouping allows you to organize your workflows in a way that makes sense to you and your team. For example, you may want to group all your onboarding workflows or group all your transactional workflows together. You can create as many groups as you need and assign workflows to them as you see fit.
Working with workflow groups
To create a workflow group, follow these steps:
- Navigate to the Workflows page in the Novu interface.
- Select any workflow from the list.
- Click on the cog icon on the top right side to open the workflow settings.
- Stay on the General settings tab.
- Click on the Workflow Group dropdown and select the group you want to assign to the workflow.
- To create a new group start writing some text and a Create New option will appear. Click on it to create a new group and select this group for this workflow.
- Click on the update button on the top right side to save the changes for the entire workflow.
Selecting existing workflow group and creating a new workflow group
To edit a workflow group name, follow these steps:
- Navigate to the Settings page in the Novu interface.
- Copy the API Key from settings (Each environment has a different API Key).
- Navigate to API Reference page to fetch all workflow groups in Novu documentation.
- Use the previously copied API Key as the Authorization header. Make sure it is in the correct format
ApiKey <API_KEY>
- Click on the send button to fetch all the workflow groups.
- In the response field copy the _id field of the workfow group that you want to edit.
- Use the copied _id as the path parameter in the request URL of workflow update API using the same API Key as the Authorization header. Write the new name for the group in the body field.
- Click on the send button to update the workflow group name.
Searching Workflows
Workflows can be searched by their name or trigger identifier. This feature makes it easy to find the desired workflow and quickly access its details.
Workflow search option
Result after serching workflow having event in name
FAQs
Was this page helpful?