Environments
Environments let one workflow run with different credentials and different versions depending on where it runs.
For example, a Staging environment can use sandbox API keys and a newer revision, while Production keeps live
keys and the revision you have already tested.
An environment controls three things for a run:
| What | How |
|---|---|
| Secret values | A secret can have a value per environment, set when you create or edit it (secrets). The Secrets list shows which secrets differ per environment. |
| Connection credentials | A connection can have a per-environment configuration (overrides). |
| Workflow revision | An environment can pin its own published revision (pinned revisions). |
Anything you don't override uses the project's shared values.
Creating an environment
Go to Settings → Project → Environments and click New Environment. Give it a name of up to 128
characters, such as Production or Staging.
Your plan sets how many environments a project can have (one on the smallest plan, unlimited on the largest). See plan limits.
Creating, renaming and deleting environments and changing the default requires the Administrator role.
Which environment a run uses
| How the run starts | Environment |
|---|---|
| Webhook, schedule, database row, email or SFTP trigger | The target environment chosen when the workflow was published. If none was chosen, the project's default environment. If there is no default either, shared values. |
| Test run in the editor | The environment you pick in the test-run dialog, or Default (no environment) for shared values. |
| Public API execute call | The environmentId in the request body, or shared values when it is omitted. |
The environment of each run is stored on the execution and can be used to filter execution logs.
In expressions, read it with {{ $execution.environmentId }}.
Project default environment
On the Environments settings page, choose a Default environment for triggers. Trigger-started runs use it whenever the published revision has no target environment. Select None (shared values) to clear it. A change applies to new runs immediately, because Blokkio re-registers the triggers of all published workflows in the project.
Target environment when publishing
When you publish a workflow, the dialog has a Target environment for triggers option. Leave it on Project default to follow the project setting, or pick an environment to bind this version's webhook, schedule and polling runs to it.
Pinned revisions and promotion
By default every environment runs the workflow's published revision. You can instead pin a specific published
revision per environment, so you can publish a change, try it in Staging, and only then move it to Production.
Open Settings → Project → Environments → Workflow promotion and select a workflow. The table shows, for each environment, which revision it runs (or Follows published) and when it was set.
- Set revision: pin any published revision to an environment. Drafts can't be pinned; publish the draft first.
- Follow published revision: remove the pin so the environment runs whatever is currently published.
When a run starts in an environment with a pinned revision, that revision's definition is used.
Promoting with a diff
Under Promote, choose a source (Published revision or another environment) and a target environment. Blokkio shows what will change in the target before you confirm:
- Added and removed nodes
- Changed nodes, with the names of the fields that changed (for example
Send invoice (url, headers)) - Connections (edges) added and removed
Canvas positions and sample data are ignored, so moving nodes around doesn't count as a change. If both revisions are identical the diff says so. Click Promote to <environment> to pin the source's revision to the target.
Pinning and promoting require the permission to publish workflows (Administrator or Contributor) and are recorded in the audit log.
Connection overrides
A connection can use a different configuration in each environment, for example sandbox OAuth client credentials or a staging API key.
- Go to Connections, open the row's ⋯ menu and choose Environment overrides.
- Click Add override next to an environment.
- Edit the JSON configuration. The editor starts from the connection's default configuration, so change only the values that differ, then click Save override.
The override is merged over the connection's configuration field by field for runs in that environment: fields in the override win, and fields you leave out keep their default values. Stored override values are never shown again. To change one, click Replace and enter the values again. Click Remove to fall back to the default configuration.
Click Test on an environment's row (or choose ⋯ → Test connection → In … on the Connections page) to test the connection with that environment's values. The result is shown, but the connection's health status, which describes the default configuration, is not changed. See connections.
Use cases
| Scenario | How |
|---|---|
| Different API keys per environment | Give the secret a per-environment value, or add a connection override |
| Test a change before it reaches production | Publish, pin the new revision to Staging, then promote it to Production |
| Webhooks for production only | Set Production as the project default, or as the target environment when publishing |