tenant, app, region, or any key that matches your product model. Each context entry is either a simple identifier or a rich object with an id and optional data fields.

How contexts fit into Novu’s model
When you trigger a workflow, you pass:- A subscriber (who receives the notification)
- A payload (event-specific data for this run)
- An optional context (shared metadata that scopes and personalizes the notification)
You can pass up to five context keys per trigger. Each context
data object is limited to 64KB. See Manage contexts for schema details.Context vs payload
| Payload | Context | |
|---|---|---|
| Scope | Single workflow execution | Persistent across triggers |
| Typical use | Order ID, message text, action URL | Tenant name, app branding, region |
| In templates | {{payload.field}} | {{context.tenant.data.name}} |
| Inbox filtering | Not used for scoping | Exact-match filtering |
| Auto-created | No | Yes, on first reference |
Context structure
Each key in thecontext object is a context type. Novu supports three formats per key:
What you can use contexts for
Multi-tenancy
Isolate notifications per organization, workspace, or customer using a
tenant context—without prefixing subscriber IDs or duplicating workflows.App or feature scoping
Route notifications to the right Inbox by scoping with an
app or feature key when one subscriber uses multiple products.Dynamic branding
Store logos, colors, and plan names in context
data and reference them in templates with {{context}}.Conditional workflow logic
Branch workflow steps based on context values, such as sending enterprise-only emails when
context.tenant.data.plan is enterprise.How context scoping works
In workflows and templates
Context data is available in every template editor through the{{context}} helper:
In the Inbox
The Inbox uses exact-match filtering. Thecontext prop on <Inbox /> must match the context used at trigger time, key for key and value for value. Notifications triggered with a tenant context only appear in an Inbox initialized with the same tenant context.
| Workflow context | Inbox context | Displayed? |
|---|---|---|
{ tenant: "acme" } | { tenant: "acme" } | Yes |
{ tenant: "acme" } | { tenant: "globex" } | No |
{ tenant: "acme" } | {} | No |
Trigger a workflow with context
- Node.js
- Python
- Go
- PHP
- .NET
- Java
- cURL
Next steps
Multi-tenancy
Implement tenant isolation with contexts end to end.
Manage contexts
Create, update, and delete contexts through the API or dashboard.
Contexts in workflows
Personalize templates and add conditional logic with context data.
Inbox with context
Filter the Inbox by context and secure it with
contextHash.