Delete n8n Executions (Bulk)
n8n_delete_executionsRemove workflow executions in n8n using filters like workflow ID, status, date range, or specific IDs to manage automation history and optimize performance.
Instructions
Delete multiple executions based on filters.
⚠️ WARNING: This action cannot be undone! Use with caution.
Args:
workflowId (string, optional): Delete executions for this workflow
status (string, optional): Delete executions with this status
deleteBefore (string, optional): Delete executions before this date (ISO 8601 format)
ids (array, optional): Specific execution IDs to delete
Returns: Count of deleted executions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | No | Delete executions for this workflow | |
| status | No | Delete executions with this status | |
| deleteBefore | No | Delete executions before this date (ISO 8601) | |
| ids | No | Specific execution IDs to delete |
Implementation Reference
- src/tools/executions.ts:178-210 (handler)Registration and handler logic for the 'n8n_delete_executions' tool.
server.registerTool( 'n8n_delete_executions', { title: 'Delete n8n Executions (Bulk)', description: `Delete multiple executions based on filters. ⚠️ WARNING: This action cannot be undone! Use with caution. Args: - workflowId (string, optional): Delete executions for this workflow - status (string, optional): Delete executions with this status - deleteBefore (string, optional): Delete executions before this date (ISO 8601 format) - ids (array, optional): Specific execution IDs to delete Returns: Count of deleted executions.`, inputSchema: DeleteExecutionsSchema, annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false } }, async (params: z.infer<typeof DeleteExecutionsSchema>) => { const result = await post<{ deletedCount: number }>('/executions/delete', params); return { content: [{ type: 'text', text: `✅ Deleted ${result.deletedCount} execution(s).` }], structuredContent: result }; } );