Nightly n8n API Workflow Shutdown + Data Table Logging
Nightly n8n API Workflow Shutdown + Data Table Logging
Regular price
£50.99
Regular price
£50.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
Nightly n8n API Workflow Shutdown + Data Table Logging
Regular price
£50.99
Regular price
£50.99
Sale price
Unit price
/
per
Nightly n8n Shutdown Automation: Log Active Workflows to a Data Table, Then Deactivate for Maintenance
This n8n API workflow runs every night at 22:30 to identify all currently active workflows, records them in an n8n Data Table, and then deactivates everything except the workflow(s) you choose to exclude—perfect for safe, repeatable maintenance windows.
What this workflow does
- Scheduled execution: Automatically runs daily at 22:30.
- Fetch active workflows via API: Calls the n8n API to list up to 250 active workflows on your instance.
- Process results one-by-one: Splits the API response into one item per workflow.
- Skip protected workflows: Skips the current workflow and any workflow IDs listed in excluded_workflow_ids.
- Log deactivation candidates: For each remaining workflow, writes workflow_id, workflow_name, and deactivated_at to an n8n Data Table.
- Deactivate for maintenance: Calls the n8n API again to deactivate each logged workflow.
Use cases
- Before planned downtime, reliably deactivate active automations to reduce load and avoid unintended runs.
- Maintain auditability by storing which workflows were deactivated and when.
- Exclude critical workflows (e.g., monitoring or handoff automations) from shutdown using excluded_workflow_ids.
- Run maintenance consistently on SaaS operators managing multiple n8n instances.
Technical details
- Integrations: n8n API via HTTP Request using an n8n API credential.
- Nodes used: if, set, split out, Data Table, Sticky Note, HTTP Request.
- Configuration: Set base_url to your n8n instance and select the target Data Table (e.g., maintenance_log with columns: workflow_id, workflow_name, deactivated_at).
- Scalability note: If you have more than 250 active workflows, add pagination to the “list active workflows” request.
