Skip to product information

Schedule n8n API Workflow Cleanup: Delete Archived Workflows

Schedule n8n API Workflow Cleanup: Delete Archived Workflows

 (200+Reviews)
Regular price £56.99
Regular price £56.99 Sale price
SAVE Sold out
Instant Digital Download
Unlimited Downloads
Lifetime Access in Your Account
🔥
128+ Sold
Popular with n8n builders
23 people viewing
High interest right now
9 added today
Fast-moving digital product
Schedule n8n API Workflow Cleanup: Delete Archived Workflows

Schedule n8n API Workflow Cleanup: Delete Archived Workflows

Regular price £56.99
Regular price £56.99 Sale price
SAVE Sold out

Schedule Daily Cleanup of Archived n8n Workflows—With a Safe Preview or Live Deletion

This n8n workflow automatically scans your n8n instance every day, identifies workflows that are archived and older than your chosen retention threshold, and either generates a detailed preview summary or deletes them in batches via the n8n API—while protecting anything tagged for keep.

What this workflow does

  • Runs daily at 09:00 (in the workflow’s timezone) to start the cleanup process.
  • Fetches workflows from the n8n API (optionally scoped to a specific project_id).
  • Filters down to archived workflows only, then validates configuration before proceeding.
  • Selects deletion candidates older than the retention cutoff date.
  • Excludes any workflow that includes a protected tag (for example, “keep”).
  • If dry_run is enabled (recommended first), outputs a preview-style summary with stats and a candidate list.
  • If dry_run is disabled, splits candidates into individual items and deletes workflows via the n8n API using configurable batch_size and batch_interval_ms.
  • Finishes with a final report including retention settings, candidate details, and deletion success/failure counts.

Use cases

  • Keep your n8n workspace tidy by automatically removing old archived automations.
  • Establish a repeatable retention policy for SaaS operations and automation engineers.
  • Safely test cleanup rules with dry-run previews before enabling live deletions.
  • Prevent accidental removal by tagging important workflows (e.g., protected_tag = “keep”).

Technical details

  • Uses n8n nodes including if, set, code, filter, and split out.
  • Relies on an n8n API credential for both listing and deleting workflows.
  • Outputs a preview or deletion summary depending on dry_run, with batching controlled by batch_size and batch_interval_ms.
View full details