Actions44
- Execution Actions
- Monitoring Actions
- Scheduler Actions
- Tag Actions
- Workflow Actions
Scheduler → Queue Protection
AI-generatedSummary
Caps the number of waiting executions per selected workflow by stopping any beyond a configured limit, via the n8n public API. Returns a per-workflow report of waiting count and canceled overflow.
Inputs
- Workflow Selection — How to choose target workflows: searchable list (default), multiple from list, current workflow, or by URL/ID (comma-separated allowed).
- Workflow Name or ID (required) — Single workflow to protect; shown when selection mode is 'list'.
- Workflow Names or IDs — Multiple workflows to protect; shown when selection mode is 'multiple'. At least one workflow must be resolved or the node errors.
- Workflow URL or IDs — Workflow URLs, IDs, or comma-separated IDs; shown when selection mode is 'manual'.
- Max Waiting Executions — Number of waiting executions allowed per workflow (0–1000, default 10). Executions beyond this count are stopped.
Output shape
A single item with a results array, one entry per workflow: workflowId, waitingCount, canceledOverflowCount, and protected (true when waitingCount <= the limit).
Waiting executions are listed with up to 10 pages (100 per page) and no data included. The first N in the API's returned order are kept; the rest are stopped via POST /executions/{id}/stop. A failed stop call throws, aborting the run (unless Continue On Fail is set). Because
protectedcompares the pre-cancel count, it is false for any workflow where executions were canceled. Requires n8nApi credentials.
Examples
Example 1: Keep a webhook-driven workflow from piling up more than 20 waiting executions.
Workflow Selection: From Searchable List; pick the workflow; Max Waiting Executions: 20.
Example 2: Run on a schedule to trim queues across several workflows at once.
Workflow Selection: Multiple From List; choose workflows; Max Waiting Executions: 5.
Example 3: Self-protect the workflow that contains this node.
Workflow Selection: Current Workflow (save workflow first); Max Waiting Executions: 10.