Get Workflow
get_workflowRetrieve a legacy workflow version's definition as JSON, including activities, exits, variable values, transitions, stages, and editor status.
Instructions
Read one legacy workflow version's definition as JSON: its activities with their exits (and variable values), transitions, stages and editor status. For a readable view use outline_workflow.
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. | |
| include_variables | No | Include each activity's variable values (scripts included). Default true. |