Skip to main content

Activate and deactivate workflows on schedule using native n8n API

Workflow preview

Workflow preview
100%
Activate and deactivate workflows on schedule using native n8n API preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

How it works This workflow will activate and deactivate a selected other workflow on schedule. ️ Warning! This approach won't work for trial users as it requires n8n API that is not avai...

Best for

  • DevOps automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.n8n, n8n-nodes-base.set, n8n-nodes-base.merge, n8n-nodes-base.scheduletrigger, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Olek.

Original n8n.io source

1.1 Workflow description

Title
Activate and deactivate workflows on schedule using native n8n API
Workflow name
Activate and deactivate workflows on schedule using native n8n API

How it works

This workflow will activate and deactivate a selected other workflow on schedule.

> ⚠️ Warning! > This approach won't work for trial users as it requires n8n API that is not available to trial users. > See https://docs.n8n.io/api/ for details.

Set up steps

  1. Adjust activation/deactivation schedule per your needs. Custom (cron) interval is a recommended approach.
  2. Set targeted Workflow ID. You will find it in the URL of the workflow you want to manage.
  3. Set n8n API credentials:
  • Create an API key: how to
  • Create n8n credentials using the API key: how to

This workflow uses n8n node.

#DevOps #workflow-management


Other useful stuff

Need a universal Error workflow to catch both execution and trigger errors? Here you go: Error handling: Send email via Gmail on execution or trigger-level errors

More stuff by Olek and do not forget to backup your workflows often by automating.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - n8n Activate

Type / Role
n8n-nodes-base.n8n - n8n
Config choices
Version 1

Block 2 - n8n Deactivate

Type / Role
n8n-nodes-base.n8n - n8n
Config choices
Version 1

Block 3 - Workflow ID

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - Merge in Workflow ID for deactivation

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3

Block 5 - Merge in Workflow ID for activation

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3

Block 6 - Activate at 08:00 daily

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 7 - Deactivate at 20:00 daily

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 8 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Activate and deactivate workflows on schedule using native n8n API
Complexity intermediate
Nodes 13
Categories DevOps
Author Olek
Published 20 Mar 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3229/3229.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Activate and deactivate workflows on schedule using native n8n API do?

How it works This workflow will activate and deactivate a selected other workflow on schedule. ️ Warning! This approach won't work for trial users as it requires n8n API that is not avai...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your DevOps use case.