export-cloudflow-flow
dci export-cloudflow-flow <flowId> [flags]
Serializes the flow — plus every flow it references through subflow nodes — into a tenant-neutral, credential-free JSON bundle that can be imported into any tenant with the import operation. Tenant-scoped references (connections, Datastore tables, global variables) are declared as named requirements and rebound at import time; policy and Slack-channel references cannot travel and are recorded as unsupported references. The bundle never contains credentials, tenant identifiers, schedules, or execution state.
flowId— The ID of the flow to export.
The bundle is a document meant to be saved and replayed, so this command prints JSON by
default — redirecting it to a file is safe without --output json.
Connection, Datastore-table, and global-variable references become named requirements
that import-cloudflow-flow rebinds. Policy and Slack-channel references cannot travel and
are listed under unsupportedReferences; the nodes that use them are flagged incomplete
after import. A schedule trigger's configuration travels, but nothing runs until the imported
draft is published.
Examples
# Save the flow as a portable bundle.
dci export-cloudflow-flow <flow-id> > bundle.json
A `cloudflow.doit.com/FlowBundle` JSON document — the flow, its subflows, and the requirements (connections, Datastore tables, global variables) a target tenant must bind at import. No credentials, tenant IDs, or execution state.
# Strip local and global variable values (names, types, and required-ness still travel).
dci export-cloudflow-flow <flow-id> --include-variable-values=false > bundle.json
# See which connections the bundle expects before importing it elsewhere.
dci export-cloudflow-flow <flow-id> | jq '.requirements.connections'
Flags
| Flag | Type | Default | Example | Description |
|---|---|---|---|---|
--include-variable-values | boolean | true | When false, local and global variable values are stripped from the bundle; names, types, and required-ness always travel. Connection-typed variable values are references, not values, and always travel as requirement tokens. |
Every command also accepts the CLI-wide flags for output shaping — see Output formats and Table output options.
Output
The flow bundle.
By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.
| Field | Type | Description |
|---|---|---|
kind | string | One of: "cloudflow.doit.com/FlowBundle". |
schemaVersion | integer | Bundle format version. The server exports the newest version and accepts every version it has ever shipped. One of: 1. |
exportedAt | string (date-time) | Informational export timestamp; ignored on import. |
rootFlow | string | Key (into flows) of the flow that was exported; the rest are its subflows. |
flows | array of object | |
flows[].key | string | Bundle-local flow key. Opaque — the server generates new IDs at import. |
flows[].name | string | |
flows[].description | string | |
flows[].tags | map of array of string | |
flows[].triggerType | string | |
flows[].firstNode | string | Key of this flow's entry node. |
flows[].nodes | array of object | |
flows[].nodes[].key | string | |
flows[].nodes[].name | string | |
flows[].nodes[].description | string | |
flows[].nodes[].type | string | Node type (e.g. triggerNode, actionNode, datastoreNode). Validated against the supported node-type set at import. |
flows[].nodes[].parameters | object | Node parameters with tenant-scoped scalar references replaced by $req:/$bundle: tokens. |
flows[].nodes[].approval | object | Approval configuration without recipients (recipients are tenant-scoped and removed at export). |
flows[].nodes[].approval.required | boolean | |
flows[].nodes[].approval.message | string | |
flows[].nodes[].approval.rejectApprovalAfterTime | boolean | |
flows[].nodes[].approval.rejectTimeValue | integer | |
flows[].nodes[].approval.rejectTimeUnit | string | |
flows[].nodes[].transitions | array of object | |
flows[].nodes[].transitions[].target | string | Key of the node this transition points at. |
flows[].nodes[].transitions[].label | string | |
flows[].nodes[].transitions[].pathId | string | |
flows[].localVariables | array of object | |
flows[].localVariables[].key | string | |
flows[].localVariables[].name | string | |
flows[].localVariables[].description | string | |
flows[].localVariables[].required | boolean | |
flows[].localVariables[].type | string | |
flows[].localVariables[].elementType | string | |
flows[].localVariables[].value | string | Present unless the export stripped variable values. Connection-typed values are $req:connections/<key> tokens. |
flows[].unsupportedReferences | array of object | Tenant-scoped references removed at export (policy IDs, Slack channels); import flags the affected nodes incomplete. |
flows[].unsupportedReferences[].nodeKey | string | |
flows[].unsupportedReferences[].kind | string | One of: "policy", "slackChannel". |
flows[].unsupportedReferences[].detail | string | |
requirements | object | Tenant-scoped resources the bundle needs; each is bound to a target-tenant resource at import. |
requirements.connections | array of object | |
requirements.connections[].key | string | |
requirements.connections[].provider | string | Cloud provider the bound connection must have (e.g. amazon-web-services). |
requirements.connections[].name | string | The source connection's display name, as a matching hint. |
requirements.connections[].usedByNodes | array of string | |
requirements.datastoreTables | array of object | |
requirements.datastoreTables[].key | string | |
requirements.datastoreTables[].name | string | |
requirements.datastoreTables[].description | string | |
requirements.datastoreTables[].fields | array of object | |
requirements.datastoreTables[].fields[].name | string | |
requirements.datastoreTables[].fields[].dataType | string | |
requirements.datastoreTables[].fields[].isUnique | boolean | |
requirements.datastoreTables[].fields[].description | string | |
requirements.datastoreTables[].usedByNodes | array of string | |
requirements.globalVariables | array of object | |
requirements.globalVariables[].key | string | |
requirements.globalVariables[].name | string | |
requirements.globalVariables[].description | string | |
requirements.globalVariables[].type | string | |
requirements.globalVariables[].elementType | string | |
requirements.globalVariables[].value | string | Present unless the export stripped variable values. |
requirements.globalVariables[].usedByNodes | array of string |
Raw JSON schema
{
"type": "object",
"description": "Portable, tenant-neutral export of one or more flows. Contains no credentials, tenant identifiers, schedules, or execution state; tenant-scoped references are declared under `requirements` and appear inside node parameters as `$req:<section>/<key>` tokens (subflow references as `$bundle:flows/<flowKey>`).",
"required": [
"kind",
"schemaVersion",
"rootFlow",
"flows"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"cloudflow.doit.com/FlowBundle"
]
},
"schemaVersion": {
"type": "integer",
"description": "Bundle format version. The server exports the newest version and accepts every version it has ever shipped.",
"enum": [
1
]
},
"exportedAt": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "Informational export timestamp; ignored on import."
},
"rootFlow": {
"type": "string",
"description": "Key (into `flows`) of the flow that was exported; the rest are its subflows."
},
"flows": {
"type": "array",
"maxItems": 20,
"items": {
"type": "object",
"required": [
"key",
"name",
"firstNode",
"nodes"
],
"properties": {
"key": {
"type": "string",
"description": "Bundle-local flow key. Opaque — the server generates new IDs at import."
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
},
"triggerType": {
"type": "string",
"nullable": true
},
"firstNode": {
"type": "string",
"description": "Key of this flow's entry node."
},
"nodes": {
"type": "array",
"maxItems": 150,
"items": {
"type": "object",
"required": [
"key",
"name",
"type"
],
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string",
"description": "Node type (e.g. `triggerNode`, `actionNode`, `datastoreNode`). Validated against the supported node-type set at import."
},
"parameters": {
"type": "object",
"additionalProperties": true,
"description": "Node parameters with tenant-scoped scalar references replaced by `$req:`/`$bundle:` tokens."
},
"approval": {
"type": "object",
"description": "Approval configuration without recipients (recipients are tenant-scoped and removed at export).",
"properties": {
"required": {
"type": "boolean"
},
"message": {
"type": "string"
},
"rejectApprovalAfterTime": {
"type": "boolean"
},
"rejectTimeValue": {
"type": "integer"
},
"rejectTimeUnit": {
"type": "string"
}
}
},
"transitions": {
"type": "array",
"items": {
"type": "object",
"required": [
"target"
],
"properties": {
"target": {
"type": "string",
"description": "Key of the node this transition points at."
},
"label": {
"type": "string",
"nullable": true
},
"pathId": {
"type": "string",
"nullable": true
}
}
}
}
}
}
},
"localVariables": {
"type": "array",
"maxItems": 50,
"items": {
"type": "object",
"required": [
"key",
"name",
"type"
],
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"required": {
"type": "boolean"
},
"type": {
"type": "string"
},
"elementType": {
"type": "string"
},
"value": {
"type": "string",
"description": "Present unless the export stripped variable values. Connection-typed values are `$req:connections/<key>` tokens."
}
}
}
},
"unsupportedReferences": {
"type": "array",
"description": "Tenant-scoped references removed at export (policy IDs, Slack channels); import flags the affected nodes incomplete.",
"items": {
"type": "object",
"required": [
"nodeKey",
"kind"
],
"properties": {
"nodeKey": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"policy",
"slackChannel"
]
},
"detail": {
"type": "string"
}
}
}
}
}
}
},
"requirements": {
"type": "object",
"description": "Tenant-scoped resources the bundle needs; each is bound to a target-tenant resource at import.",
"properties": {
"connections": {
"type": "array",
"maxItems": 50,
"items": {
"type": "object",
"required": [
"key",
"provider",
"name"
],
"properties": {
"key": {
"type": "string"
},
"provider": {
"type": "string",
"description": "Cloud provider the bound connection must have (e.g. `amazon-web-services`)."
},
"name": {
"type": "string",
"description": "The source connection's display name, as a matching hint."
},
"usedByNodes": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"datastoreTables": {
"type": "array",
"maxItems": 50,
"items": {
"type": "object",
"required": [
"key",
"name",
"fields"
],
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"dataType"
],
"properties": {
"name": {
"type": "string"
},
"dataType": {
"type": "string"
},
"isUnique": {
"type": "boolean"
},
"description": {
"type": "string"
}
}
}
},
"usedByNodes": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"globalVariables": {
"type": "array",
"maxItems": 50,
"items": {
"type": "object",
"required": [
"key",
"name",
"type"
],
"properties": {
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string"
},
"elementType": {
"type": "string"
},
"value": {
"type": "string",
"description": "Present unless the export stripped variable values."
},
"usedByNodes": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
Errors
On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.
HTTP status to exit code mapping
| HTTP status | Exit code | Error code | Meaning |
|---|---|---|---|
| 400, 422 | 30 | VALIDATION_ERROR | The arguments or request body were rejected. Review the command's flags and payload. |
| 401 | 10 | AUTHENTICATION_FAILED | Not signed in, or the API token is invalid. Run dci login or check DCI_API_KEY. |
| 403 | 11 | PERMISSION_DENIED | The DoiT user or the active customer context does not have access. |
| 404 | 20 | RESOURCE_NOT_FOUND | The requested resource does not exist. Check the identifier argument. |
| 500 | 40 | API_SERVER_ERROR | The API failed to process the request. Retryable; contact DoiT support if it persists. |
Related
- import-cloudflow-flow — Import a flow bundle
- list-cloudflows — List CloudFlows
- build-cloud-flow — Build a new CloudFlow from scratch
- refine-cloud-flow — Refine a CloudFlow from natural language intent
- test-run-cloudflow-flow — Test-run a flow
- API reference: GET /cloudflow/v1/flows/{flowId}/export
Aliases: exportcloudflowflow