Personalize workflows and templates in Novu using context
Learn how to use contexts in Novu to personalize notification templates, control workflow logic, and customize the Inbox. Understand supported data formats and how to debug context usage from the activity feed.
Contexts let you personalize how notifications are rendered and delivered by making contextual data available inside template editors, step conditions, and the <Inbox /> component.
How to use context
Once a context is created either through the Novu dashboard or API, its data becomes available for use in your templates editors, step conditions, and for customizing the <Inbox /> component.
Using context data in the template editor
Use the {{context}} Handlebars helper to access context data in any template editor. The context key you provide while creating the context (for example, tenant, region) becomes the accessor.
For example, if a context with this data is created:
You can access the name and plan in your in-app, email, SMS, or push template like this:
Or

Using context in step conditions
You can use context variables in the Step conditions tab of a workflow step to add conditional logic to your notifications. For example, only send a "Feature X is now enabled" email if context.tenant.data.plan is enterprise.

To learn how contexts are structured or how to define them, refer to the Managing Contexts documentation.
Viewing and debugging contexts
Once you start using contexts in your workflows, Novu provides full observability so you can monitor and debug your context usage after a workflow has been triggered.
Searching for workflow runs
You can filter your workflow runs to find all executions associated with a specific context.
- Navigate to the Activity Feed in your Novu dashboard.
- Select the Workflow Runs tab.
- In the search bar, click Context and enter the context
typeandidusing the formattype:id.

Verifying the resolved context
To confirm that Novu received and processed your context data correctly, you can inspect the API traces for a specific run.
- From the Activity Feed, select the relevant workflow run from the list in the Requests tab.
- In the workflow run details, go to the API Traces tab.
Here, you will see the full context object that was resolved and attached to that specific workflow execution.
