# Logs (/integrations/logs)



{/* MANUAL-CONTENT-START:intro */}

The Logs block queries workflow run history in the current workspace. **Query Logs** filters runs and returns matching run IDs; **Get Run Details** retrieves one run’s status, trigger, timing, cost, final output, and trace spans. See [Using Logs in Workflows](/workflows/blocks/logs) for a query-and-inspect example.

{/* MANUAL-CONTENT-END */}

## Use the block [#usage-instructions]

Query workflow run logs in the current workspace with the same filters as the Logs page, returning matching run IDs. Fetch full details for a single run, including its trace spans.

## Actions [#actions]

### Query Logs [#query-logs]

Query workflow run logs in the current workspace with the full Logs-page filter set. Returns matching run IDs.

#### Input [#input]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `workflowIds` | string | No | Comma-separated workflow IDs to filter by |
| `folderIds` | string | No | Comma-separated folder IDs to filter by (descendants included) |
| `level` | string | No | Comma-separated statuses: 'info', 'error', 'running', 'pending', 'cancelled'. Omit for all. |
| `triggers` | string | No | Comma-separated trigger types (api, webhook, schedule, manual, chat, mcp, workflow, sim, …) |
| `startDate` | string | No | ISO 8601 timestamp; only runs at or after this time |
| `endDate` | string | No | ISO 8601 timestamp; only runs at or before this time |
| `search` | string | No | Free-text search across log fields |
| `costOperator` | string | No | Cost comparison operator: '=', '>', '\<', '>=', '\<=', '!=' |
| `costValue` | number | No | Cost threshold in credits, compared using costOperator |
| `durationOperator` | string | No | Duration comparison operator: '=', '>', '\<', '>=', '\<=', '!=' |
| `durationValue` | number | No | Duration threshold in milliseconds, compared using durationOperator |
| `limit` | number | No | Max run IDs to return (default 100, max 200) |
| `sortBy` | string | No | Sort field: 'date' (default), 'duration', 'cost', 'status' |
| `sortOrder` | string | No | Sort order: 'desc' (default) or 'asc' |

#### Output [#output]

| Parameter | Type | Description |
| - | - | - |
| `runIds` | array | IDs of the runs matching the filters |

### Get Run Details [#get-run-details]

Fetch details for a single workflow run by its run ID, including the full trace spans.

#### Input [#input-1]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `runId` | string | Yes | The run ID to fetch details for |

#### Output [#output-1]

| Parameter | Type | Description |
| - | - | - |
| `runId` | string | The run ID |
| `workflowId` | string | Workflow ID this run belongs to |
| `workflowName` | string | Workflow name |
| `status` | string | Run status |
| `trigger` | string | How the run was triggered |
| `startedAt` | string | Run start time (ISO 8601) |
| `durationMs` | number | Run duration in milliseconds |
| `cost` | number | Run cost in credits |
| `traceSpans` | array | Full trace spans for the run |
| `finalOutput` | json | Final output of the run |
