Skip to main content
Glama

list-executions

Retrieve and filter workflow executions from your n8n instance by status, workflow ID, or other parameters for detailed analysis and management.

Instructions

Retrieve all executions from your instance with optional filtering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
includeDataNo
limitNo
statusNo
workflowIdNo

Implementation Reference

  • Handler function that executes the list-executions tool by calling the N8nClient's getExecutions method with provided parameters.
    const { clientId, includeData, status, workflowId, limit } = args as { clientId: string; includeData?: boolean; status?: 'error' | 'success' | 'waiting'; workflowId?: string; limit?: number; }; const client = clients.get(clientId); if (!client) { return { content: [{ type: "text", text: "Client not initialized. Please run init-n8n first.", }], isError: true }; } try { const executions = await client.getExecutions({ includeData, status, workflowId, limit }); return { content: [{ type: "text", text: JSON.stringify(executions.data, null, 2), }] }; } catch (error) { return { content: [{ type: "text", text: error instanceof Error ? error.message : "Unknown error occurred", }], isError: true }; } }
  • src/index.ts:691-707 (registration)
    Registration of the list-executions tool in the ListTools response, defining its name, description, and input schema.
    name: "list-executions", description: "Retrieve all executions from your instance with optional filtering.", inputSchema: { type: "object", properties: { clientId: { type: "string" }, includeData: { type: "boolean" }, status: { type: "string", enum: ["error", "success", "waiting"] }, workflowId: { type: "string" }, limit: { type: "number" } }, required: ["clientId"] } },
  • N8nClient helper method that constructs the API request to fetch executions from the n8n server with optional filters.
    async getExecutions(options: { includeData?: boolean; status?: 'error' | 'success' | 'waiting'; workflowId?: string; limit?: number; } = {}): Promise<N8nExecutionList> { const params = new URLSearchParams(); if (options.includeData !== undefined) params.append('includeData', String(options.includeData)); if (options.status) params.append('status', options.status); if (options.workflowId) params.append('workflowId', options.workflowId); if (options.limit) params.append('limit', String(options.limit)); return this.makeRequest<N8nExecutionList>(`/executions?${params.toString()}`); }
  • Type definition for the response structure of execution lists from n8n API.
    interface N8nExecutionList { data: N8nExecution[]; nextCursor?: string; }
  • Type definition for individual n8n execution objects.
    interface N8nExecution { id: number; data?: any; finished: boolean; mode: string; retryOf?: number; retrySuccessId?: number; startedAt: string; stoppedAt?: string; workflowId: number; waitTill?: string; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/illuminaresolutions/n8n-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server