设计并输出 n8n 工作流 JSON,具备健壮的触发器、幂等性、错误处理、日志记录、重试机制和人机协作审核队列。当您需要可审计且不会静默失败的自动化时使用。
Scanned 6/6/2026
Install via CLI
openskills install L-LesterYu/OpenClaw-hot-skills-zh---
name: n8n-workflow-automation
description: 设计并输出 n8n 工作流 JSON,具备健壮的触发器、幂等性、错误处理、日志记录、重试机制和人机协作审核队列。当您需要可审计且不会静默失败的自动化时使用。
---
# n8n 工作流自动化 - 重试、日志记录和审核队列
## 目的
设计并输出 n8n 工作流 JSON,具备健壮的触发器、幂等性、错误处理、日志记录、重试机制和人机协作审核队列。
## 使用场景
- 触发条件:
- 构建一个每周一运行并发送合规摘要的 n8n 工作流
- 为此工作流添加错误处理和重试机制,以及失败审核队列
- 创建一个记录每次运行并向跟踪器写入状态行的 webhook 工作流
- 使此 n8n 流程具有幂等性,以便重新运行时不会重复记录
- 为此工作流配备审计日志和人工审批步骤
- 不适用场景:
- 您需要不使用 n8n 的纯代码自动化(请使用脚本/CI 技能)
- 您需要绕过安全控制或隐藏审计轨迹
- 您需要购买或推荐违禁物品/服务
## 输入
- 必需:
- 工作流意图:触发器类型 + 计划/时区 + 成功标准
- 目标:结果写入位置(email/Drive/Sheet/DB)和必需字段
- 可选:
- 要修改的现有 n8n 工作流 JSON
- 示例负载 / 示例记录
- 去重键定义(什么使记录唯一)
- 示例:
- Cron:周一 08:00 Europe/London;发送摘要邮件 + Drive 上传
- Webhook:接收 JSON;路由到文件夹
## 输出
- 默认(只读):工作流设计规范(节点、数据契约、失败模式)
- 如果明确请求:`workflow.json`(n8n 可导入 JSON)+ `runbook.md`(来自模板)
成功 = 工作流具有幂等性、记录每次运行、安全重试,并将失败路由到审核队列
## 工作流程
1. 明确触发器:
- Cron/webhook/手动;计划/时区;并发预期
2. 定义数据契约:
- 输入模式、必需字段和验证规则
3. 设计幂等性:
- 选择去重键和存储(DB/Sheet)以防止重试时重复
4. 添加可观察性:
- 生成 `run_id`,记录开始/结束,存储状态行和错误详情
5. 实现错误处理:
- 每节点错误分支、带退避的重试和最终失败通知
6. 添加人机协作(HITL)审核队列:
- 将失败项目写入队列(Sheet/DB)并需要审批才能重新处理
7. "无静默失败"关卡:
- 如果计数/阈值失败,停止工作流并告警
8. 输出:
- 如果请求 JSON:生成可导入的 n8n 工作流 JSON + 运行手册
9. 停止并询问用户,如果:
- 目标系统未知
- 不存在去重键
- 凭证策略(环境变量)未指定
- 工作流需要尚未批准的特权访问
## 输出格式
如果输出 **n8n 工作流 JSON**,需符合:
```json
{
"name": "<workflow name>",
"nodes": [ { "name": "Trigger", "type": "n8n-nodes-base.cron", "parameters": {}, "position": [0,0] } ],
"connections": {},
"settings": {},
"active": false
}
```
同时使用 `assets/runbook-template.md` 输出 `runbook.md`。
## 安全与边界情况
- 默认只读;仅在明确请求时输出工作流 JSON
- 不要在 JSON 中包含密钥;仅引用环境变量/凭证名称
- 包含审计日志 + 失败通知;避免可能静默丢失数据的工作流
- 优先最小权限:仅调用所需的 API 并最小化范围
## 示例
- 输入:"每周一 cron,发送合规摘要,重试失败。"
输出:节点图 + `workflow.json`(包含 Cron → Fetch → Aggregate → Email),加上错误分支到审核队列
- 输入:"记录运行并写入状态行的 Webhook。"
输出:Webhook → Validate → Process → Append status row;错误时 → log + notify + queue
No comments yet. Be the first to comment!
Playbook for creating and editing uCoz landing pages via MCP tools (`templates_tool`, `ftp_tool`, `modules_tool`). Use for tasks such as: "build a landing page", "update the homepage as a landing page", "create a promo page on the homepage", "add a lead form / menu / SEO to the homepage". Homepage: `page_list`, `page_get`; first publish — `page_update` with full `page_tmpl`; HTML edits after generation — `patch_template` (module_id=2, template_id=1), not `update_template`. Activate the mail f...
Interact with the Paperclip control plane API to manage tasks, coordinate with other agents, and follow company governance. Use when you need to check assignments, update task status, delegate work, post comments, set up or manage routines (recurring scheduled tasks), or call any Paperclip API endpoint. Do NOT use for the actual domain work itself (writing code, research, etc.) — only for Paperclip coordination.
Digital Audio Workstation usage, music composition, interactive music systems, and game audio implementation for immersive soundscapes.
Instantly.ai cold email outreach API - manage campaigns, leads, accounts, and analytics. Use for cold email automation, lead management, campaign creation/monitoring, and email account warmup.
Run a single Terminal-Bench problem through Paperclip in a bounded, human-in-the-loop improvement cycle until the smoke passes, the board rejects the next fix, the iteration budget is exhausted, or a real blocker is named. Each iteration runs a bounded smoke against an isolated Paperclip App worktree, captures artifacts, diagnoses the exact stop point with `/diagnose-why-work-stopped`, requests board confirmation before any product fix, then reruns against the same worktree. Use whenever an i...