Templates / Shut down nightly active workflows with the n8n API and data tables

Shut down nightly active workflows with the n8n API and data tables

Ready for 3.0

by Daniele Crupi ✓ · 1 views · created 2026-09-22 · DevOps

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 8 nodes and runs on a schedule (every day at 22:00). It uses only n8n's built-in nodes.

How it runs

Trigger: On a schedule (every day at 22:00).

  1. Config (Edit Fields (Set)): sets 2 fields: base_url, excluded_workflow_ids
  2. Recupera workflow pubblicati (HTTP Request): calls an HTTP API
  3. Estrai singoli workflow (Split Out): splits a list into separate items
  4. Escludi self e workflow esclusi (If): checks a condition and branches into true / false
  5. Loop su ogni workflow (Loop Over Items (Split in Batches)): loops over the items in batches
  6. Salva in maintenance_log (Data table): uses Data table
  7. Disattiva workflow (HTTP Request): calls an HTTP API (POST)

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (7)

From the author

Quick overview This workflow runs nightly at 22:30 and uses the n8n API to list all active workflows on your n8n instance, exclude specified IDs, log them to an n8n Data Table, and deactivate the remaining workflows for maintenance. How it works 1. Runs every…

Excerpt from Daniele Crupi's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.