get_executions
Retrieve workflow execution history with filters by workflow ID, status, limit, and cursor for pagination.
Instructions
Get workflow execution history with filtering options
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | No | Filter by workflow ID | |
| finished | No | Filter by execution status | |
| limit | No | Maximum number of executions to return | |
| cursor | No | Cursor for pagination |
Implementation Reference
- src/handlers.ts:116-119 (handler)The handler case in the switch statement that processes the 'get_executions' tool call. It validates input via GetExecutionsSchema and delegates to the client's getExecutions method.
case "get_executions": { const params = GetExecutionsSchema.parse(args); return await client.getExecutions(params); } - src/handlers.ts:40-45 (schema)Zod schema (GetExecutionsSchema) that validates the input parameters for the 'get_executions' tool: optional workflowId, finished, limit (default 10), and cursor.
const GetExecutionsSchema = z.object({ workflowId: z.string().optional(), finished: z.boolean().optional(), limit: z.number().optional().default(10), cursor: z.string().optional(), }); - src/tools.ts:181-206 (registration)The tool definition/registration in the tools array, including its name 'get_executions', description, and inputSchema with properties for workflowId, finished, limit, and cursor.
{ name: "get_executions", description: "Get workflow execution history with filtering options", inputSchema: { type: "object", properties: { workflowId: { type: "string", description: "Filter by workflow ID", }, finished: { type: "boolean", description: "Filter by execution status", }, limit: { type: "number", description: "Maximum number of executions to return", default: 10, }, cursor: { type: "string", description: "Cursor for pagination", }, }, }, }, - src/n8n-client.ts:113-121 (helper)The N8nClient.getExecutions method that makes the actual HTTP GET request to /api/v1/executions with query parameters and returns the response data.
async getExecutions(params?: { workflowId?: string; finished?: boolean; limit?: number; cursor?: string; }) { const response = await this.client.get("/api/v1/executions", { params }); return response.data; }