Get Flow Execution Logs
get_flow_logsRetrieve flow execution log entries including error messages, step-level debug, and cancellation reasons. Pair with flow execution details for complete troubleshooting.
Instructions
Retrieve flow execution log entries from sys_flow_log for a given context.
Log entries include error messages, step-level debug output, and cancellation reasons. Use this alongside get_flow_execution_details to get the full picture of what happened during an execution.
Note: Log entries may be empty for simple successful executions, or if the flow's reporting level is set to NONE. Errors and warnings are always logged regardless of the reporting level setting.
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 returned by test_flow, execute_flow, execute_subflow, or execute_action. | |
| limit | No | Maximum number of log entries to return. Default: 100. | |
| order_direction | No | Order direction: "asc" (default, oldest first) or "desc" (newest first). |