Skip to main content

Export and Import Workflows

Copy a single workflow between environments (test to production, one tenant to another) or keep it in version control: export it as a file and import the file elsewhere. Importing always creates a new draft workflow; it never changes an existing one.

To move whole collections with their proxies, use collection export and import instead.

In the console​

  • Export: open the workflow and choose ⋯ › Export (viewer role). The browser saves <workflow name>.zerq-workflow.json, with the published version (else the saved draft); unsaved edits in the editor are not included. A notice says how many secret values were removed.
  • Import: in Workflows, click New workflow › Import a file (modifier role), upload the file or paste its JSON, optionally give the new workflow another name or description, and click Import workflow. A file that is not a zerq.workflow.v1 export is refused before it is sent; the server's reasons (for example duplicate node ids) are shown in the dialog. When the import has warnings, the dialog lists them (secrets to fill in, credentials and called workflows this environment does not have, unknown step types, a dropped error workflow, triggers that will not publish) and Open the draft opens the new workflow; without warnings it opens straight away.

Export​

GET /api/v1/workflows/{id}/export (viewer role) returns the workflow as a zerq.workflow.v1 file:

{
"format": "zerq.workflow.v1",
"name": "Nightly report",
"description": "Sends the daily totals",
"tags": ["reports"],
"settings": { "timeout_ms": 120000, "save_run_data": false, "error_workflow_id": "6651…" },
"input_schema": null,
"output_schema": null,
"definition": { "nodes": [ … ], "edges": [ … ] },
"exported_at": "2026-11-08T10:00:00Z",
"secrets_removed": ["sign:data.config.secret", "call_api:data.config.headers.Authorization"]
}
  • definition is the published version, or the draft when the workflow was never published.
  • Secret values are removed, not masked: literal values of secret fields (secret, password, client_secret, api_key, private_key, token, access_token, refresh_token, bearer_token, connection_string) and of sensitive headers (Authorization, Cookie, and names containing token, secret, password, api-key, apikey or auth) are emptied. secrets_removed lists each place as <node id>:<path>, so whoever imports the file knows what to fill in. Expressions ({{ … }}) are kept.
  • Credential ids are kept. They name credentials of the exporting environment: in another environment, choose a credential there after importing (the import lists the ones it cannot find).
  • A proxy's own workflow that is not in the workflows store answers 409: copy it into a workflow first (POST /api/v1/workflows {"from_proxy": "<proxy id>"}).

Exporting is a read and is not recorded in the audit log; the file holds no secret values.

Import​

POST /api/v1/workflows/import (modifier role, recorded in the audit log as workflow / import) takes the file as its body and answers 201:

{
"workflow": { "id": "6652…", "name": "Nightly report", "published_version": 0, "active": false, "origin": { "kind": "import" }, … },
"warnings": [
"Secret removed on export: fill in sign:data.config.secret before publishing.",
"Credential 6640… (node call_api) does not exist in this environment: choose a credential here.",
"settings.error_workflow_id \"6651…\" was not imported: …"
]
}
  • The new workflow is a draft: not published and not active. Fill in the removed secrets, choose credentials, then publish it (and activate it if it runs on a schedule, Kafka or email).
  • The file is refused (400) when format is not zerq.workflow.v1, name or definition is missing, a node has no id or type, two nodes share an id, an edge names a node that does not exist, or a value is the mask ******** (copied from a workflow read instead of an export).
  • warnings lists what needs attention in this environment:
    • secrets removed on export, to fill in;
    • credential ids that do not exist here;
    • workflows that an Execute Workflow step or AI Agent tool calls and that do not exist here;
    • node types this server does not know;
    • an error_workflow_id that does not name a usable error workflow here (it is left out);
    • an entry trigger set that will not publish (see Several triggers).
  • Importing the same file twice creates two workflows.

From an AI assistant​

The Management MCP tools export_workflow (id) and import_workflow (the file's fields) call these endpoints with the caller's roles.