n8n-workflow-patterns by czlonkowski/n8n-skills
npx skills add https://github.com/czlonkowski/n8n-skills --skill n8n-workflow-patterns构建 n8n 工作流的成熟架构模式。
基于对真实工作流使用情况的分析:
Webhook 处理 (最常见)
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
Webhook 处理 - 适用于以下情况:
HTTP API 集成 - 适用于以下情况:
数据库操作 - 适用于以下情况:
AI 智能体工作流 - 适用于以下情况:
计划任务 - 适用于以下情况:
所有模式共享以下构建模块:
构建任何工作流时,请遵循此检查清单:
activateWorkflow 操作激活工作流Trigger → Transform → Action → End
适用场景:具有单一路径的简单工作流
Trigger → IF → [True Path]
└→ [False Path]
适用场景:基于条件执行不同操作
Trigger → [Branch 1] → Merge
└→ [Branch 2] ↗
适用场景:可以同时运行的独立操作
Trigger → Split in Batches → Process → Loop (until done)
适用场景:分块处理大型数据集
Main Flow → [Success Path]
└→ [Error Trigger → Error Handler]
适用场景:需要单独的错误处理工作流
问题:无法访问 webhook 负载数据
解决方案:数据嵌套在 $json.body 下
❌ {{$json.email}}
✅ {{$json.body.email}}
参见:n8n 表达式语法技能
问题:节点处理所有输入项,但我只想要一个
解决方案:使用"执行一次"模式或仅处理第一项
{{$json[0].field}} // 仅第一项
问题:API 调用失败,返回 401/403
解决方案:
问题:节点以意外顺序执行
解决方案:检查工作流设置 → 执行顺序
问题:表达式显示为字面文本
解决方案:在表达式周围使用 {{}}
这些技能与工作流模式协同工作:
n8n MCP 工具专家 - 用于:
n8n 表达式语法 - 用于:
n8n 节点配置 - 用于:
n8n 验证专家 - 用于:
常见工作流模式:
最常见的触发器:
最常见的转换:
最常见的输出:
平均工作流复杂度:
1. Webhook (路径: "form-submit", POST)
2. Set (映射表单字段)
3. Slack (发布消息到 #notifications)
1. Schedule (每日上午 9 点)
2. HTTP Request (获取分析数据)
3. Code (聚合数据)
4. Email (发送格式化报告)
5. Error Trigger → Slack (失败时通知)
1. Schedule (每 15 分钟)
2. Postgres (查询新记录)
3. IF (检查是否存在记录)
4. MySQL (插入记录)
5. Postgres (更新同步时间戳)
1. Webhook (接收聊天消息)
2. AI Agent
├─ OpenAI Chat Model (ai_languageModel)
├─ HTTP Request Tool (ai_tool)
├─ Database Tool (ai_tool)
└─ Window Buffer Memory (ai_memory)
3. Webhook Response (发送 AI 回复)
1. Manual Trigger (用于测试)
2. HTTP Request (GET /api/users)
3. Split In Batches (每次处理 100 条)
4. Set (转换用户数据)
5. Postgres (更新或插入用户)
6. Loop (回到步骤 3 直到完成)
关于每种模式的全面指导:
来自 n8n 模板库:
模板 #2947:天气到 Slack
Webhook 处理:最常见模式
HTTP API:常见模式
数据库操作:常见模式
AI 智能体:使用量增长中
使用 n8n-mcp 工具中的 search_templates 和 get_template 来查找示例!
关键点:
后续步骤:
相关技能:
每周安装数
2.0K
代码仓库
GitHub 星标
3.3K
首次出现
Jan 20, 2026
安全审计
安装于
opencode1.8K
gemini-cli1.7K
codex1.7K
github-copilot1.5K
kimi-cli1.4K
amp1.4K
Proven architectural patterns for building n8n workflows.
Based on analysis of real workflow usage:
Webhook Processing (Most Common)
Webhook Processing - Use when:
HTTP API Integration - Use when:
Database Operations - Use when:
AI Agent Workflow - Use when:
Scheduled Tasks - Use when:
All patterns share these building blocks:
When building ANY workflow, follow this checklist:
activateWorkflow operationTrigger → Transform → Action → End
Use when : Simple workflows with single path
Trigger → IF → [True Path]
└→ [False Path]
Use when : Different actions based on conditions
Trigger → [Branch 1] → Merge
└→ [Branch 2] ↗
Use when : Independent operations that can run simultaneously
Trigger → Split in Batches → Process → Loop (until done)
Use when : Processing large datasets in chunks
Main Flow → [Success Path]
└→ [Error Trigger → Error Handler]
Use when : Need separate error handling workflow
Problem : Can't access webhook payload data
Solution : Data is nested under $json.body
❌ {{$json.email}}
✅ {{$json.body.email}}
See: n8n Expression Syntax skill
Problem : Node processes all input items, but I only want one
Solution : Use "Execute Once" mode or process first item only
{{$json[0].field}} // First item only
Problem : API calls failing with 401/403
Solution :
Problem : Nodes executing in unexpected order
Solution : Check workflow settings → Execution Order
Problem : Expressions showing as literal text
Solution : Use {{}} around expressions
These skills work together with Workflow Patterns:
n8n MCP Tools Expert - Use to:
n8n Expression Syntax - Use to:
n8n Node Configuration - Use to:
n8n Validation Expert - Use to:
Common workflow patterns:
Most Common Triggers :
Most Common Transformations :
Most Common Outputs :
Average Workflow Complexity :
1. Webhook (path: "form-submit", POST)
2. Set (map form fields)
3. Slack (post message to #notifications)
1. Schedule (daily at 9 AM)
2. HTTP Request (fetch analytics)
3. Code (aggregate data)
4. Email (send formatted report)
5. Error Trigger → Slack (notify on failure)
1. Schedule (every 15 minutes)
2. Postgres (query new records)
3. IF (check if records exist)
4. MySQL (insert records)
5. Postgres (update sync timestamp)
1. Webhook (receive chat message)
2. AI Agent
├─ OpenAI Chat Model (ai_languageModel)
├─ HTTP Request Tool (ai_tool)
├─ Database Tool (ai_tool)
└─ Window Buffer Memory (ai_memory)
3. Webhook Response (send AI reply)
1. Manual Trigger (for testing)
2. HTTP Request (GET /api/users)
3. Split In Batches (process 100 at a time)
4. Set (transform user data)
5. Postgres (upsert users)
6. Loop (back to step 3 until done)
For comprehensive guidance on each pattern:
From n8n template library:
Template #2947 : Weather to Slack
Webhook Processing : Most common pattern
HTTP API : Common pattern
Database Operations : Common pattern
AI Agents : Growing in usage
Use search_templates and get_template from n8n-mcp tools to find examples!
Key Points :
Next Steps :
Related Skills :
Weekly Installs
2.0K
Repository
GitHub Stars
3.3K
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode1.8K
gemini-cli1.7K
codex1.7K
github-copilot1.5K
kimi-cli1.4K
amp1.4K
97,600 周安装