n8n_deactivate_workflow
Stop automated workflow execution in n8n by deactivating it using its unique identifier to prevent scheduled or triggered runs.
Instructions
Deactivate a workflow to stop it from running automatically.
Args:
id (string): Workflow ID to deactivate
Returns: The deactivated workflow.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The unique identifier of the resource |
Implementation Reference
- src/tools/workflows.ts:302-309 (handler)The handler function for n8n_deactivate_workflow tool, which calls the deactivate endpoint.
async (params: z.infer<typeof IdParamSchema>) => { const workflow = await post<N8nWorkflow>(`/workflows/${params.id}/deactivate`); return { content: [{ type: 'text', text: `✅ Workflow deactivated.\n\n${formatWorkflow(workflow)}` }], structuredContent: workflow }; } - src/tools/workflows.ts:283-310 (registration)Tool registration for n8n_deactivate_workflow.
server.registerTool( 'n8n_deactivate_workflow', { title: 'Deactivate n8n Workflow', description: `Deactivate a workflow to stop it from running automatically. Args: - id (string): Workflow ID to deactivate Returns: The deactivated workflow.`, inputSchema: IdParamSchema, annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false } }, async (params: z.infer<typeof IdParamSchema>) => { const workflow = await post<N8nWorkflow>(`/workflows/${params.id}/deactivate`); return { content: [{ type: 'text', text: `✅ Workflow deactivated.\n\n${formatWorkflow(workflow)}` }], structuredContent: workflow }; } ); - src/tools/workflows.ts:294-294 (schema)Input schema for n8n_deactivate_workflow, which uses IdParamSchema.
inputSchema: IdParamSchema,