Environments
Understanding and managing environments in Novu
Novu uses environments to separate your development and production workflows. When you create an account, you'll get two default environments: Development
and Production
.
Development Environment
Use the development environment to test new notification workflows, validate changes before deploying to production, and experiment with different configurations.
Production Environment
The production environment is your live environment where notifications are sent to real users. Use the production environment for production use cases, and other environments for non-production use cases.
Custom Environments
Create custom environments to match your development workflow:
- Go to the Environments page in Novu dashboard
- Click on the
Create environment
button on the top right. - A popup will appear. Enter names like
Staging
orQA
. - Assign unique colors to easily distinguish between environments.
- Click on
Create environment
button on the bottom right. - New environment will be created and will be available in the environments list.
What's Unique to Each Environment?
Each environment maintains its own separate:
- Subscribers
- Topics
- Workflows
- Webhooks
- Integrations
- API keys (application identifier and secret key)
- Activity feed
Environment Credentials
Each environment has two unique identifiers:
-
Application Identifier
- Public ID for client-side apps
- Used with <Inbox />
- Unique per environment
- Safe to expose in frontend code
-
API Secret Key
- Used for backend API authentication
- Keep this secure and never expose publicly
- Different for each environment
Best Practice: Configure these credentials in your application based on the active environment, similar to how you manage other service credentials.
Promoting workflows between environments
One workflow can be synced to another environment using the Sync Workflow
option in workflow actions. While syncing, Novu will give option to which environment to sync the workflow to. If workflow with same identifier is already present in the destination environment, it will be overwritten with the source workflow.
Steps:
- Go to the Workflows page in Novu dashboard
- Click on the three dot menu in the workflow row
- If you have more than two environments, hover over the
Sync Workflow
option to see the destination environment, then click it. - If you have only two environments, Click on the
Sync to <Environment Name>
option. HereEnvironment Name
is the name of another environment. - The workflow will be synced to the destination environment.
Currently, a single workflow can be synced to another environment.