Actions44
- Execution Actions
- Monitoring Actions
- Scheduler Actions
- Tag Actions
- Workflow Actions
Workflow → Deactivate Workflow
AI-generatedSummary
Deactivates one or more n8n workflows through the n8n public API (POST /workflows/{id}/deactivate). It can also stop or purge active executions and record a "drop before" timestamp so events received while paused can be discarded later.
Inputs
- Workflow Selection — How to pick targets: searchable list (default), multiple from list, current workflow (must be saved), or by URL/ID. Manual mode accepts workflow URLs, IDs, or comma-separated IDs.
- Workflow Name or ID / Workflow Names or IDs / Workflow URL or IDs (required) — The workflow(s) to deactivate. Which field is shown depends on the selection mode. At least one workflow is required.
- Graceful Shutdown — Default true. It is read and echoed in the result, but the source does not use it to change behavior.
- Force Stop Active Executions — Default false. When true, running and waiting executions are stopped after deactivation. This only applies if Drop Events Received While Inactive is off.
- Drop Events Received While Inactive — Default true. Records a pause timestamp (dropBefore) in the node's workflow static data, then after deactivation purges the workflow's new/running/waiting executions. Running executions are stopped, and new and waiting ones are deleted (deletion may fail on some n8n API versions). This takes precedence over Force Stop.
Output shape
One item per input item, shaped as { results: [...] }. Each entry holds workflowId, workflowName, action ('deactivate'), success, message, graceful, forceStop, dropMissedEvents, pausedAt, dropBefore, purgedExecutions and stoppedExecutions.
Requires an n8nApi credential. The purged and stopped execution lists give per-execution success or error details. A failed API call throws, unless the node's Continue On Fail is enabled, in which case an error item is returned. API requests are retried up to 3 times on transient HTTP errors. The pause timestamp can be checked by the Message Freshness Guard operation.
Examples
Example 1: Pause a production workflow during a deployment and discard anything queued meanwhile
Workflow Selection: From Searchable List; pick the workflow; Drop Events Received While Inactive: true (default).
Example 2: Turn off a workflow but stop its in-flight runs without deleting queued ones
Select the workflow; Drop Events Received While Inactive: false; Force Stop Active Executions: true.
Example 3: Deactivate the workflow that contains this node
Workflow Selection: Current Workflow; leave the other options at their defaults.