I lost half a day to an n8n workflow that was "working." It never ran.
说明与用途
一个活跃性检查脚本检测 n8n 工作流被取消发布或缺失,并在状态变化时仅发送一次电子邮件,避免警报噪音。
问题
A scheduled n8n workflow stopped running silently after being unpublished, causing missed executions without any error alerts.
结果
The liveness check script reliably detects when a workflow is unpublished or missing, sending a single email on state change and avoiding alert fatigue.
工作流
- 1. Deploy n8n 2.43.6 with PostgreSQL 16 on EC2.
2. Import and publish a one‑minute scheduled workflow.
3. Unpublish the workflow to simulate a silent failure.
4. Run a Python script every 15 minutes that:
a. GET /workflows to verify existence and active flag.
b. GET /executions?workflowId=
<id>&limit=1 to check last run. c. GET /executions?workflowId=<id>&status=success&limit=1 to confirm recent success. 5. Compare current state with previous state; if changed, email notification. 6. Re‑publish the workflow and observe the script detect the change and send a recovery email.
证据
I did not want to take this on faith, so I ran it.
Zero. Two and a half minutes, at least two scheduled runs missed, and the execution count did not move by one.
A separate scheduled workflow, every 15 minutes, reads the n8n public API and answers four questions for each workflow on a watch list.
Only email on change.
- 记录日期: 2026-11-03T15:14:16.129Z