Export Workflow
export_workflowExport a legacy ServiceNow workflow version as one complete JSON document, including every activity, variable, transition, and condition. Read-only, so nothing on the instance is changed.
Instructions
Export a legacy workflow version as one complete JSON document (now-sdk-ext/legacy-workflow@1): every activity with its variables, the transitions and conditions. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| version | No | Which version: current (default: your draft if you have one, else the published one), published, or draft. Ignored when workflow is a version sys_id. | |
| instance | No | The ServiceNow instance auth alias to connect to. This is the alias configured via `snc configure` (e.g., "myinstance", "prod", "test"). The user will typically refer to this by name when saying things like "on my myinstance instance". If not provided, falls back to the SN_AUTH_ALIAS environment variable. | |
| workflow | Yes | The workflow's name or sys_id, or a workflow version sys_id. |