> ## Documentation Index
> Fetch the complete documentation index at: https://docs.get-hive.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflow export format

> The JSON a Hive workflow exports to and imports from: the envelope, graph, nodes and edges, what is stripped on export, and the issues an import reports.

**Export workflow** in the workflow menu downloads a workflow as a JSON file. **Import workflow**
creates a new private draft from such a file, in the same or another workspace. This page describes
that file so you can version workflows in source control, review changes, or generate them.

## Envelope

```json theme={null}
{
  "version": 1,
  "exportedAt": "2026-09-29T10:15:00.000Z",
  "workflow": {
    "id": "wf_…",
    "ownerUserId": "user_…",
    "name": "Fee Reminder",
    "description": "Chase overdue invoices every morning.",
    "status": "deployed",
    "shareScope": "private",
    "sharedUserIds": [],
    "graph": { "nodes": [ … ], "edges": [ … ] },
    "runCount": 42,
    "lastRunAt": "2026-09-29T06:00:07.000Z",
    "deployedAt": "2026-09-20T12:00:00.000Z",
    "createdAt": "2026-09-01T09:00:00.000Z",
    "updatedAt": "2026-09-20T12:00:00.000Z",
    "revision": 17,
    "settings": {
      "notificationRecipients": ["ops@example.com"],
      "monthlySpendLimitMinor": 0,
      "usageAlerts": false,
      "perRunLimit": 1,
      "hourlyExecutionLimit": 1
    }
  }
}
```

<ResponseField name="version" type="1" required>The format version. Only `1` exists.</ResponseField>
<ResponseField name="exportedAt" type="string" required>ISO 8601 timestamp.</ResponseField>

<ResponseField name="workflow" type="object" required>
  The workflow. `name` is 1-120 characters and `description` up to 500. Unknown keys are rejected.
</ResponseField>

The file carries the **draft** graph as it was when exported. Identity and history fields (`id`,
`ownerUserId`, `status`, counts, dates, `sharedUserIds`) are informational: an import ignores them.

## Graph

```json theme={null}
{
  "nodes": [
    {
      "id": "trigger",
      "type": "trigger",
      "trigger": "schedule",
      "schedule": { "frequency": "daily", "hour": 6, "minute": 0 },
      "position": { "x": 0, "y": 0 }
    },
    {
      "id": "find",
      "type": "agent",
      "title": "Find overdue invoices",
      "prompt": "List every overdue invoice with the client's email.",
      "model": null,
      "tools": [],
      "connectorPins": ["xero"],
      "position": { "x": 0, "y": 160 },
      "errorPolicy": { "maxAttempts": 2 }
    }
  ],
  "edges": [{ "id": "e1", "source": "trigger", "target": "find" }]
}
```

| Part | Rules |
| - | - |
| `nodes` | Up to 50. Exactly one `trigger`, at least one other step. Ids may not contain `#` or `:`. |
| `edges` | Up to 100, each `{ id, source, target }`. Only condition edges carry a `sourceHandle` (`true`, `false`, a condition key, or `else`). |
| Shape | No cycles and no unreachable steps. |

Every node has `id`, `type` and `position` (`x`, `y` within ±10,000), and optionally `title` (120
characters), `note` (500) and `comment` (500). Steps other than the trigger can also carry:

* `active: false` — kept but skipped;
* `errorPolicy` — `maxAttempts` (1-10, including the first) and/or `onFailure`
  (`fail_run` or `continue`). A policy that sets neither is rejected.

Each type's own fields — for example `prompt`, `model`, `tools`, `connectorPins`, `outputSchema`
and `maxSteps` on an `agent`; `expression` or `router` on a `condition`; `loop`, `wait`, `action`,
`output`, `webSearch`, `image` and `document` on their steps; `agents` on `parallel_agents` — are
listed with their limits in the
[triggers and steps reference](/workflows/workflow-steps). Placeholders use `{{step_id.path}}`.

## What export strips

Exports leave out anything that only means something to the exporter:

* **Personal accounts.** A step pinned to a specific connected account (`provider::connectionId`)
  keeps that pin in the file only when the account is yours. Anyone else's account is exported with
  only the provider, for example `xero`. Import removes every account from the pins: if the importer
  has exactly one account for that provider it is used, otherwise the step asks them to connect or
  choose one.
* **Reader-specific fields**: permissions, access, owner details, run-account requirements and the
  workflow's cost to date.

Schedules, public form links, releases and runs are never part of an export. The share list (`shareScope`, `sharedUserIds`) is in the file, but an import ignores it.

## What import does

Importing needs the **Operator** role or higher. Hive then:

1. checks the file against the format above, and refuses it if it is malformed, repeats a node id,
   or contains an action your role may not put in a workflow;
2. creates a **new private draft** you own, whatever the file's status or sharing said;
3. clamps `settings` to your workspace's usage limits;
4. records the import in the audit log;
5. returns the draft with a list of **issues** — up to 50 things a deploy would refuse until you
   fix them.

Each issue names the step (`nodeId`, or `null` for the whole workflow), a `code` and a message:

```json theme={null}
{
  "nodeId": "send",
  "code": "workflow_connector_binding_required",
  "message": "Connect Outlook to continue."
}
```

Issue codes are the same ones a deploy refuses with, such as `connector_capability_missing`,
`workflow_model_unavailable`, `web_search_unavailable`, `saved_agent_unavailable`,
`output_key_unknown` and `error_policy_reference`. See
[Deploy a release](/workflows/test-and-deploy#deploy-a-release).

## Related

<CardGroup cols={2}>
  <Card title="Share and reuse" icon="users" href="/workflows/share-and-reuse">
    Duplicate, export, import and share.
  </Card>

  <Card title="Triggers and steps" icon="list" href="/workflows/workflow-steps">
    Every node type and its fields.
  </Card>

  <Card title="Limits reference" icon="gauge" href="/developers/limits-reference">
    Every limit in one table.
  </Card>

  <Card title="Developer overview" icon="code" href="/developers/overview">
    Every way to build on Hive.
  </Card>
</CardGroup>
