Make your n8n workflows prove they did their job: six patterns for silent failures
说明与用途
在 n8n 中检测“静默”错误的模式:验证输入行、使用 sentinel 节点处理零结果、发送心跳消息,并维护发送日志以防止重复发送。
问题
n8n workflows can finish green without performing any work, leading to silent failures such as zero rows, all rows filtered out, or duplicate messages.
结果
The six patterns convert silent failures into visible rows or messages, ensuring operators see when data is missing, filtered out, or duplicated.
工作流
- Validate rows on entry and attach error reasons
- Use an IF node on row_valid to separate valid and invalid rows
- Add a sentinel node that emits an item when zero rows are returned
- Create a dedicated branch for empty data to send a heartbeat message
- Implement a send log in workflow staticData keyed by natural identifiers to prevent duplicate sends
- Prune old keys from the send log to keep it manageable
证据
A green execution in n8n means the nodes ran. It does not mean any work happened.
The first Code node in most of my workflows does not transform anything. It validates.
If the node before it returns zero items, there is nothing to evaluate, and the flow just stops there.
Double sends come from double triggers: a manual rerun, a webhook retry, two overlapping schedules.
- 记录日期: 2026-10-21T13:56:23.976Z