Activate and deactivate workflows on schedule using native n8n API — n8n 工作流

复杂度 定时7 个节点💎 Other👁 919 次查看作者:Olek

概览

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 Adjust activation/deactivation schedule per your needs. Custom (cron) interval is a recommended approach. Set targeted Workflow ID. You will find it in the URL of the workflow you want to manage.

Set n8n API credential

使用的节点

n8n DeactivateWorkflow IDMerge in Workflow ID for activationDeactivate at 20:00 dailySticky Note5

工作流预览

Set targeted Workflow ID
You will find it in the URL of the workflow you want to
![img](https://community.n8n.io/uploads/default/origina
Set Activate/deactivate schedule
Custom (cron) interval is a recommended approach.
Set n8n API credentials
1. Create an API key:
https://docs.n8n.io/api/authentication/
2. Create n8n credentials using the API key
This workflow uses [n8n node](https://docs.n8n.io/integ
⚠️ Warning!
This approach won't work for trial users as it requires
See https://docs.n8n.io/api/ for details.
Scheduling workflow activity time
Your workflow wants to work normal business hours?
Maybe it is in its own right.
Activate this workflow!
N
n8n Activate
N
n8n Deactivate
W
Workflow ID
M
Merge in Workflow ID for…
M
Merge in Workflow ID for…
A
Activate at 08:00 daily
D
Deactivate at 20:00 daily
7 nodes8 edges

工作原理

  1. 1

    触发器

    工作流由 定时 触发器启动,按预定计划运行。

  2. 2

    处理

    数据流经 7 个节点, connecting merge, n8n, scheduletrigger。

  3. 3

    输出

    工作流完成自动化并将结果发送到配置的目标。

节点详情 (7)

N8

n8n Deactivate

n8n

#1
WO

Workflow ID

set

#2
ME

Merge in Workflow ID for activation

merge

#3
DE

Deactivate at 20:00 daily

scheduleTrigger

#4
ST

Sticky Note5

stickyNote

#5

如何导入此工作流

  1. 1点击右侧 下载 JSON 按钮保存工作流文件。
  2. 2打开你的 n8n 实例,依次点击 工作流 → 新建 → 从文件导入
  3. 3选择下载的 activate-and-deactivate-workflows-on-schedule-using-native-n8n-api 文件并点击导入。
  4. 4为每个服务节点配置 凭证(API 密钥、OAuth 等)。
  5. 5点击 测试工作流 验证一切正常,然后激活它。

或直接在 n8n → 从 JSON 导入 中粘贴:

{ "name": "Activate and deactivate workflows on schedule using native n8n API", "nodes": [...], ...}

集成

mergen8nscheduletriggerset

获取此工作流

一键下载并导入

下载 JSON在 n8n.io 上查看
节点7
复杂度medium
触发器scheduled
查看次数919
分类Other

创建者

Olek

Olek

@olek

标签

mergen8nscheduletriggerset

n8n 新手?

n8n 是一款免费开源的工作流自动化工具,支持自托管或使用云版本。

免费获取 n8n →