Cancel Flow
cancel_flowCancel a running or paused flow execution using its context ID. Use this to stop a background flow that is no longer needed, is stuck, or was started by mistake.
Instructions
Cancel a running or paused flow execution by its context ID. Use this to stop a background flow that is no longer needed, is stuck in a waiting state, or was started by mistake.
IMPORTANT: This is a destructive operation — the flow will be permanently cancelled and cannot be resumed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instance | No | The ServiceNow instance auth alias to use. This is the alias configured via `now-sdk auth --add` (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. | |
| context_id | Yes | The flow context sys_id from the execution result's contextId field. | |
| reason | No | Reason for cancellation. Default: "Cancelled via FlowManager". |