deactivate_workflow
Stop a running workflow by providing its workflow ID. Disable active automation processes when needed.
Instructions
Deactivate a workflow
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workflowId": "<workflowId>"
},
"name": "deactivate_workflow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | Yes | The ID of the workflow to deactivate |
Implementation Reference
- src/tools.ts:147-160 (registration)Registration of the 'deactivate_workflow' tool with name, description, and inputSchema requiring workflowId.
{ name: "deactivate_workflow", description: "Deactivate a workflow", inputSchema: { type: "object", properties: { workflowId: { type: "string", description: "The ID of the workflow to deactivate", }, }, required: ["workflowId"], }, }, - src/handlers.ts:105-108 (handler)Handler case that parses workflowId using WorkflowIdSchema and calls client.deactivateWorkflow().
case "deactivate_workflow": { const { workflowId } = WorkflowIdSchema.parse(args); return await client.deactivateWorkflow(workflowId); } - src/n8n-client.ts:98-103 (helper)Client method that sends a PATCH request to /api/v1/workflows/{id} with active: false to deactivate a workflow.
async deactivateWorkflow(id: string) { const response = await this.client.patch(`/api/v1/workflows/${id}`, { active: false, }); return WorkflowSchema.parse(response.data); } - src/handlers.ts:12-14 (schema)Zod schema used for parsing the workflowId input argument for deactivate_workflow.
const WorkflowIdSchema = z.object({ workflowId: z.string(), });