n8n-prd-generator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

n8n Automation PRD Generator

n8n自动化PRD生成器

Generate structured, MCP-ready PRD documents for n8n automation workflows. Captures all requirements needed to build the workflow with Claude Code + n8n-mcp.

为n8n自动化工作流生成符合MCP规范的结构化PRD文档。涵盖使用Claude Code + n8n-mcp构建工作流所需的全部需求。

Activation

触发条件

When the user wants to plan or specify an n8n automation workflow, activate this skill. The output is a PRD markdown file saved to the project directory.

当用户想要规划或定义n8n自动化工作流时,触发此技能。输出为保存到项目目录中的PRD markdown文件。

Process: Structured Requirements Gathering

流程:结构化需求收集

Follow these phases strictly. Do NOT skip phases or rush to the PRD.
严格遵循以下阶段,不得跳过阶段或直接生成PRD。

Phase 1: Initial Understanding

阶段1:初步理解

Ask the user to describe the automation they need. Accept any format:
  • Free-text description
  • Bullet points
  • Meeting notes
  • Voice transcript
After receiving the input, summarize what you understood in 2-3 sentences and confirm with the user before proceeding.
请用户描述所需的自动化功能,接受任何格式的输入:
  • 自由文本描述
  • 项目符号列表
  • 会议记录
  • 语音转录
收到输入后,用2-3句话总结你的理解,并在继续下一步前与用户确认。

Phase 2: Clarifying Questions (MANDATORY)

阶段2:澄清问题(必填)

Ask targeted questions across these dimensions. Use the AskUserQuestion tool with grouped questions (max 4 per round). Run multiple rounds if needed.
Round 1 - Trigger & Schedule:
  • What starts the workflow? (Webhook, Schedule, Manual, Event-based)
  • How often should it run? (Real-time, hourly, daily, weekly)
  • What timezone/business hours apply?
Round 2 - Data Flow & Services:
  • Which external services/APIs are involved? (Name them specifically)
  • What data comes in? (Structure, format, volume)
  • What data goes out? (Where, format, who receives it)
  • Are there data transformations needed? (Mapping, filtering, enrichment)
Round 3 - Error Handling & Edge Cases:
  • What happens if an API is down or returns errors?
  • What if incoming data is incomplete or malformed?
  • Should there be notifications on failure? (Email, Slack, etc.)
  • What are known edge cases? (Empty data, duplicates, rate limits)
Round 4 - Credentials & Environment:
  • Which services are already connected in n8n? (Existing credentials)
  • Are there API keys that need to be set up first?
  • Any environment-specific considerations? (Staging vs Production)
Skip questions that were already answered in the initial description. Ask follow-up questions if answers reveal new complexity.
针对以下维度提出针对性问题。使用AskUserQuestion工具分组提问(每轮最多4个问题),如有需要可进行多轮提问。
第一轮 - 触发器与调度:
  • 工作流的触发方式是什么?(Webhook、定时调度、手动触发、事件触发)
  • 运行频率是多少?(实时、每小时、每天、每周)
  • 适用的时区/工作时间是什么?
第二轮 - 数据流与服务:
  • 涉及哪些外部服务/API?(请具体说明名称)
  • 输入的数据是什么?(结构、格式、量级)
  • 输出的数据是什么?(输出位置、格式、接收方)
  • 是否需要进行数据转换?(映射、过滤、补全)
第三轮 - 错误处理与边缘情况:
  • 如果API不可用或返回错误,应如何处理?
  • 如果输入数据不完整或格式错误,应如何处理?
  • 发生故障时是否需要发送通知?(邮件、Slack等)
  • 已知的边缘情况有哪些?(空数据、重复数据、速率限制)
第四轮 - 凭证与环境:
  • n8n中已连接哪些服务?(现有凭证)
  • 是否需要先设置API密钥?
  • 有任何特定环境的考虑吗?( staging环境 vs 生产环境)
跳过初始描述中已回答的问题。如果答案揭示了新的复杂性,请提出跟进问题。

Phase 3: PRD Generation

阶段3:PRD生成

After all questions are answered, generate the PRD using the template below. Save it as a markdown file in the project directory:
File naming convention:
prd-[short-name].md
Example:
prd-youtube-video-ideas.md
,
prd-linkedin-lead-capture.md

所有问题回答完毕后,使用以下模板生成PRD,并保存为markdown文件到项目目录中:
文件命名规范:
prd-[short-name].md
示例:
prd-youtube-video-ideas.md
,
prd-linkedin-lead-capture.md

PRD Template

PRD模板

markdown
undefined
markdown
undefined

PRD: [Workflow Name]

PRD: [工作流名称]

Status: Draft Erstellt: [Datum] Autor: [Name]

状态: 草稿 创建日期: [日期] 作者: [姓名]

1. Ziel & Kontext

1. 目标与背景

Was soll automatisiert werden? [1-3 Saetze die das Ziel beschreiben]
Warum wird diese Automatisierung gebraucht? [Business-Kontext, Zeitersparnis, aktueller manueller Prozess]
Wer nutzt das Ergebnis? [Zielgruppe/Empfaenger des Outputs]

需要实现什么自动化? [1-3句话描述目标]
为什么需要这个自动化? [业务背景、节省时间、当前的手动流程]
谁会使用输出结果? [目标群体/输出接收方]

2. Trigger & Zeitplan

2. 触发器与调度

EigenschaftWert
Trigger-Typ[Webhook / Schedule / Manual / Event]
Zeitplan[z.B. Jeden Montag 9:00 / Echtzeit / Bei Bedarf]
Zeitzone[z.B. Europe/Berlin]
Erwartetes Volumen[z.B. 10-50 Ausfuehrungen pro Tag]

属性
触发器类型[Webhook / 定时调度 / 手动触发 / 事件触发]
调度规则[例如:每周一9:00 / 实时 / 按需触发]
时区[例如:Europe/Berlin]
预期量级[例如:每天10-50次执行]

3. Datenfluss

3. 数据流

Input

输入

  • Quelle: [Service/API/Webhook]
  • Format: [JSON / Form Data / CSV / etc.]
  • Beispiel-Payload:
json
{
  "beispiel": "daten"
}
  • 来源: [服务/API/Webhook]
  • 格式: [JSON / 表单数据 / CSV / 等]
  • 示例负载:
json
{
  "示例": "数据"
}

Verarbeitung

处理流程

  1. [Schritt 1: Was passiert mit den Daten]
  2. [Schritt 2: Transformation/Anreicherung]
  3. [Schritt n: ...]
  1. [步骤1:对数据执行的操作]
  2. [步骤2:转换/补全]
  3. [步骤n:...]

Output

输出

  • Ziel: [Service/API/E-Mail/Sheet]
  • Format: [Beschreibung des Outputs]
  • Empfaenger: [Wer bekommt das Ergebnis]

  • 目标: [服务/API/邮件/表格]
  • 格式: [输出格式描述]
  • 接收方: [谁会收到结果]

4. Beteiligte Services & Credentials

4. 涉及的服务与凭证

ServiceZweckCredential-TypStatus
[z.B. YouTube][Videos abrufen][OAuth2][Vorhanden / Fehlt]
[z.B. Anthropic][AI-Verarbeitung][API Key][Vorhanden / Fehlt]
[z.B. Gmail][E-Mail senden][OAuth2][Vorhanden / Fehlt]

服务用途凭证类型状态
[例如:YouTube][获取视频][OAuth2][已存在 / 缺失]
[例如:Anthropic][AI处理][API密钥][已存在 / 缺失]
[例如:Gmail][发送邮件][OAuth2][已存在 / 缺失]

5. Workflow-Architektur

5. 工作流架构

Node-Uebersicht (empfohlen)

节点概览(推荐)

#Node-NameNode-TypFunktion
1[Name][n8n-nodes-base.xyz][Was macht der Node]
2[Name][n8n-nodes-base.xyz][Was macht der Node]
............
#节点名称节点类型功能
1[名称][n8n-nodes-base.xyz][节点的作用]
2[名称][n8n-nodes-base.xyz][节点的作用]
............

Datenfluss-Diagramm

数据流图

[Trigger] -> [Node 2] -> [Node 3] -> ... -> [Output]
                              |
                              v
                        [Error Branch]
[触发器] -> [节点2] -> [节点3] -> ... -> [输出]
                              |
                              v
                        [错误分支]

Aggregation & Batching

聚合与批量处理

  • [Muessen Daten aggregiert werden bevor sie verarbeitet werden?]
  • [Gibt es Batch-Verarbeitung?]
  • [Wie viele Items werden erwartet pro Durchlauf?]

  • [是否需要在处理前聚合数据?]
  • 是否存在批量处理?
  • [每次执行预期处理多少条数据?]

6. Error Handling & Edge Cases

6. 错误处理与边缘情况

Fehlerbehandlung

错误处理

FehlertypReaktion
API nicht erreichbar[z.B. Retry 3x, dann Benachrichtigung]
Leere Daten[z.B. Info-Mail senden, Workflow beenden]
Rate Limit erreicht[z.B. Warten und erneut versuchen]
Ungueltige Eingabe[z.B. Validierung, Fehlermeldung]
错误类型应对措施
API不可达[例如:重试3次,然后发送通知]
空数据[例如:发送通知邮件,终止工作流]
达到速率限制[例如:等待后重试]
无效输入[例如:验证,发送错误消息]

Bekannte Edge Cases

已知边缘情况

  • [Edge Case 1: Beschreibung + gewuenschtes Verhalten]
  • [Edge Case 2: Beschreibung + gewuenschtes Verhalten]
  • [边缘情况1:描述 + 期望行为]
  • [边缘情况2:描述 + 期望行为]

Benachrichtigung bei Fehler

故障通知

  • Kanal: [E-Mail / Slack / etc.]
  • Empfaenger: [Wer wird benachrichtigt]
  • Inhalt: [Was soll in der Fehlermeldung stehen]

  • 渠道: [邮件 / Slack / 等]
  • 接收方: [谁会收到通知]
  • 内容: [错误消息应包含的内容]

7. n8n-spezifische Hinweise

7. n8n特定注意事项

Datenstruktur-Warnungen

数据结构警告

  • [z.B. YouTube getAll gibt id als Objekt zurueck: $json.id.videoId statt $json.id]
  • [z.B. Webhook-Daten liegen unter $json.body, nicht $json]
  • [例如:YouTube getAll接口返回的id是对象:$json.id.videoId 而非 $json.id]
  • [例如:Webhook数据位于$json.body下,而非$json]

Expression-Einschraenkungen

表达式限制

  • Kein Optional Chaining (?.) in n8n Expressions - nur in Code Nodes
  • Expressions muessen mit = Prefix beginnen wenn sie dynamisch sind
  • n8n表达式中不支持可选链(?.) - 仅在Code Node中支持
  • 动态表达式必须以=前缀开头

Aggregation

聚合

  • [Muessen Items vor AI/E-Mail-Nodes aggregiert werden?]
  • [Code Node mit "Run Once for All Items" fuer Aggregation nutzen]
  • [是否需要在AI/邮件节点前聚合数据?]
  • 使用Code Node并设置“Run Once for All Items”进行聚合

Error Handling Pattern

错误处理模式

  • onError: "continueRegularOutput"
    statt deprecated
    continueOnFail: true
  • IF-Node fuer Edge Cases (z.B. keine Daten vorhanden)

  • 使用
    onError: "continueRegularOutput"
    替代已弃用的
    continueOnFail: true
  • 使用IF节点处理边缘情况(如无数据存在)

8. Akzeptanzkriterien

8. 验收标准

  • [Kriterium 1: Was muss funktionieren]
  • [Kriterium 2: Was muss funktionieren]
  • [Kriterium 3: Was muss funktionieren]
  • Error Handling getestet (leere Daten, API-Fehler)
  • Workflow-Validierung ohne Errors (Warnings akzeptabel)
  • E2E-Test mit echten Daten erfolgreich

  • [标准1:必须实现的功能]
  • [标准2:必须实现的功能]
  • [标准3:必须实现的功能]
  • 错误处理已测试(空数据、API错误)
  • 工作流验证无错误(警告可接受)
  • 使用真实数据的端到端测试成功

9. Offene Fragen

9. 未解决的问题

  • [Frage 1: Was noch geklaert werden muss]
  • [Frage 2: Was noch geklaert werden muss]

---
  • [问题1:仍需澄清的内容]
  • [问题2:仍需澄清的内容]

---

Guidelines for the Agent

代理操作指南

DO:

应执行:

  • Ask ALL clarifying questions before generating the PRD
  • Use the n8n-mcp
    search_nodes
    tool to validate node suggestions
  • Include specific n8n node types in the architecture section
  • Flag known n8n pitfalls (data structure, expressions, aggregation)
  • Save the PRD as a file in the project directory
  • Number the workflow steps clearly
  • 生成PRD前必须询问所有澄清问题
  • 使用n8n-mcp的
    search_nodes
    工具验证节点建议
  • 在架构部分包含具体的n8n节点类型
  • 标记已知的n8n陷阱(数据结构、表达式、聚合)
  • 将PRD保存为项目目录中的文件
  • 清晰地为工作流步骤编号

DON'T:

禁止:

  • Skip the clarifying questions phase
  • Assume services or credentials - always ask
  • Generate vague requirements ("handle errors somehow")
  • Include implementation details like exact expressions or code
  • Create the workflow - this PRD is INPUT for the build phase
  • 跳过澄清问题阶段
  • 不要假设服务或凭证的存在,务必询问
  • 不要生成模糊的需求(如“以某种方式处理错误”)
  • 不要包含具体的表达式或代码等实现细节
  • 不要创建工作流 - 此PRD是构建阶段的输入

Quality Checklist (verify before delivering):

质量检查清单(交付前验证):

  • Every service has a credential status (Vorhanden/Fehlt)
  • Error handling is specified for each external API call
  • Aggregation needs are explicitly stated
  • Data flow is clear: what comes in, what goes out
  • At least 3 acceptance criteria are defined
  • Known n8n pitfalls are documented in Section 7

  • 每个服务都有凭证状态(已存在/缺失)
  • 每个外部API调用都指定了错误处理方式
  • 明确说明聚合需求
  • 数据流清晰:输入什么,输出什么
  • 至少定义了3条验收标准
  • 已知的n8n陷阱已记录在第7节

Integration with Other Skills

与其他技能的集成

Build Phase (after PRD is approved):

构建阶段(PRD批准后):

Once the user approves the PRD, they can use the n8n-mcp tools to build:
  1. search_nodes
    - Find the right nodes
  2. get_node
    - Check node configuration
  3. n8n_create_workflow
    - Build the workflow
  4. n8n_validate_workflow
    - Validate
  5. n8n_autofix_workflow
    - Auto-fix issues
  6. n8n_executions
    - Debug runs
用户批准PRD后,可使用n8n-mcp工具进行构建:
  1. search_nodes
    - 查找合适的节点
  2. get_node
    - 检查节点配置
  3. n8n_create_workflow
    - 构建工作流
  4. n8n_validate_workflow
    - 验证
  5. n8n_autofix_workflow
    - 自动修复问题
  6. n8n_executions
    - 调试运行

Related Skills:

相关技能:

  • n8n-workflow-patterns - Architectural patterns for the workflow design
  • n8n-node-configuration - Detailed node setup guidance
  • n8n-expression-syntax - Expression rules for n8n
  • n8n-validation-expert - Validation and debugging
  • n8n-workflow-patterns - 工作流设计的架构模式
  • n8n-node-configuration - 详细的节点设置指南
  • n8n-expression-syntax - n8n的表达式语法
  • n8n-validation-expert - 验证与调试