Activate and Deactivate Workflows on Schedule Using Native n8n API - n8n Workflow | Neura Market
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 an n8n API that is not available to trial users.
> See [https://docs.n8n.io/api/](https://docs.n8n.io/api/) for details.
## Set up steps
1. Adjust activation/deactivation **schedule** per your needs. A [Custom (cron) interval](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/#custom-cron-interval) is a recommended approach.
2. Set the 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](https://docs.n8n.io/api/authentication/)
- Create n8n credentials using the API key: [how to](https://docs.n8n.io/credentials/add-edit-credentials/#create-a-credential)
This workflow uses the **[n8n node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.n8n/)**.
#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](https://n8n.io/workflows/3075-error-handling-send-email-via-gmail-on-execution-or-trigger-level-errors/)
More stuff [by Olek](https://n8n.io/creators/olek/) and do not forget to backup your workflows often by [automating](https://n8n.io/workflows/?q=Backup).
Platform
n8n
Category
Business Operations & ERPs
Price
Free
Creator
Olek
DevOps
custom-cron-interval
create-a-credential
DevOps
workflow-management
n8n
set
merge
stickyNote
scheduleTrigger
How to import this workflow into n8n
1Purchase or download the workflow to get the n8n workflow JSON file.
2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
3Open each node marked with a credential warning and connect your own accounts and API keys.
4Run the workflow once manually to verify the data flow, then toggle it to Active.