delete_workflow
Remove workflows from n8n automation platform by specifying the workflow ID to manage your automation processes effectively.
Instructions
Delete an n8n workflow
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- src/index.ts:73-73 (registration)Registration of the 'delete_workflow' tool in the listTools handler, including the input schema definition.{ name: 'delete_workflow', description: 'Delete an n8n workflow', inputSchema: { type: 'object', properties: { id: { oneOf: [{ type: 'string' }, { type: 'number' }] } }, required: ['id'] } },
- src/index.ts:414-417 (handler)Main handler function that resolves the ID alias and calls the N8nClient to delete the workflow.private async handleDeleteWorkflow(args: { id: string | number }) { const id = this.resolveWorkflowId(args.id); await this.n8nClient.deleteWorkflow(id); return { content: [{ type: 'text', text: JSON.stringify(jsonSuccess({ id: args.id }), null, 2) }] };
- src/n8n-client.ts:217-219 (helper)N8nClient helper method that executes the actual DELETE /workflows/{id} API request.async deleteWorkflow(id: string | number): Promise<void> { await this.api.delete(`/workflows/${id}`); }