Get Flow Definition
get_flow_definitionReads design-time definitions of ServiceNow Flow Designer flows, subflows, and actions, including trigger, steps, logic, inputs, and outputs. Use to inspect what an artifact is, not what a run did.
Instructions
Read the design-time definition of a Flow Designer flow, subflow or action as Workflow Studio stores it: its trigger, steps, flow logic, inputs and outputs. What the artifact IS, not what a run of it did (for that, use get_flow_execution_details). Nothing is run, published or changed. The type is never inferred: a sys_id of another type fails with type_mismatch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | What the sys_id is. Default flow. | |
| view | No | summary (default): name, scope, state and counts, plus an action's steps. full: the complete definition as compact JSON (a long one is cut, and then is not valid JSON). | |
| scope | No | The application scope to read it in, when it is not global. | |
| sys_id | Yes | The flow's or subflow's sys_hub_flow sys_id, or the action's sys_hub_action_type_definition 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. |