n8n-workflow-patterns
它能做什么
这份指南可以帮你为 n8n 中的自动化工作流选择最合适的结构(即模式)。它介绍了 5 种常见模板,分别适用于不同任务,比如处理网站数据、与其他程序集成,或管理定时任务。
适用场景
- ✓当你在规划一个新的自动化工作流时。
- ✓当你需要理清自动化的结构时。
- ✓当你需要整合不同的系统或数据时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/n8n-workflow-patterns/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“如果我想接收网站表单提交的数据,并把它保存到数据库里,应该用哪种工作流模式?”
每周 5 个新技能,1 分钟读完。
工作原理
这份指南会介绍 5 种主要模式(比如 webhook 处理、API 集成等),并说明每种模式适用的场景。它还列出了常见组件和一份搭建检查清单,帮你更顺利地完成工作流。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
n8n Workflow Patterns
Proven architectural patterns for building n8n workflows.
When to Use
- You need to choose an architectural pattern for an n8n workflow before building it.
- The task involves webhook processing, API integration, scheduled jobs, database sync, or AI-agent workflow design.
- You want a high-level workflow structure rather than node-by-node troubleshooting.
The 5 Core Patterns
Based on analysis of real workflow usage:
Webhook Processing (Most Common)
- Receive HTTP requests → Process → Output
- Pattern: Webhook → Validate → Transform → Respond/Notify
[HTTP API Integration]
- Fetch from REST APIs → Transform → Store/Use
- Pattern: Trigger → HTTP Request → Transform → Action → Error Handler
Database Operations
- Read/Write/Sync database data
- Pattern: Schedule → Query → Transform → Write → Verify
AI Agent Workflow
- AI agents with tools and memory
- Pattern: Trigger → AI Agent (Model + Tools + Memory) → Output
Scheduled Tasks
- Recurring automation workflows
- Pattern: Schedule → Fetch → Process → Deliver → Log
Pattern Selection Guide
When to use each pattern:
Webhook Processing - Use when:
- Receiving data from external systems
- Building integrations (Slack commands, form submissions, GitHub webhooks)
- Need instant response to events
- Example: "Receive Stripe payment webhook → Update database → Send confirmation"
HTTP API Integration - Use when:
- Fetching data from external APIs
- Synchronizing with third-party services
- Building data pipelines
- Example: "Fetch GitHub issues → Transform → Create Jira tickets"
Database Operations - Use when:
- Syncing between databases
- Running database queries on schedule
- ETL workflows
- Example: "Read Postgres records → Transform → Write to MySQL"
AI Agent Workflow - Use when:
- Building conversational AI
- Need AI with tool access
- Multi-step reasoning tasks
- Example: "Chat with AI that can search docs, query database, send emails"
Scheduled Tasks - Use when:
- Recurring reports or summaries
- Periodic data fetching
- Maintenance tasks
- Example: "Daily: Fetch analytics → Generate report → Email team"
Common Workflow Components
All patterns share these building blocks:
1. Triggers
- Webhook - HTTP endpoint (instant)
- Schedule - Cron-based timing (periodic)
- Manual - Click to execute (testing)
- Polling - Check for changes (intervals)
2. Data Sources
- HTTP Request - REST APIs
- Database nodes - Postgres, MySQL, MongoDB
- Service nodes - Slack, Google Sheets, etc.
- Code - Custom JavaScript/Python
3. Transformation
- Set - Map/transform fields
- Code - Complex logic
- IF/Switch - Conditional routing
- Merge - Combine data streams
4. Outputs
- HTTP Request - Call APIs
- Database - Write data
- Communication - Email, Slack, Discord
- Storage - Files, cloud storage
5. Error Handling
- Error Trigger - Catch workflow errors
- IF - Check for error conditions
- Stop and Error - Explicit failure
- Continue On Fail - Per-node setting
Workflow Creation Checklist
When building ANY workflow, follow this checklist:
Planning Phase
- Identify the pattern (webhook, API, database, AI, scheduled)
- List required nodes (use search_nodes)
- Understand data flow (input → transform → output)
- Plan error handling strategy
Implementation Phase
- Create workflow with appropriate trigger
- Add data source nodes
- Configure authentication/credentials
- Add transformation nodes (Set, Code, IF)
- Add output/action nodes
- Configure error handling
Validation Phase
- Validate each node configuration (validate_node)
- Validate complete workflow (validate_workflow)
- Test with sample data
- Handle edge cases (empty data, errors)
Deployment Phase
- Review workflow settings (execution order, timeout, error handling)
- Activate workflow using
activateWorkflowoperation - Monitor first executions
- Document workflow purpose and data flow
Data Flow Patterns
Linear Flow
Trigger → Transform → Action → End
Use when: Simple workflows with single path
Branching Flow
Trigger → IF → [True Path]
└→ [False Path]
Use when: Different actions based on conditions
Parallel Processing
…
常见问题
什么是工作流“模式”?
它是一种经过验证的结构或模板,用来组织自动化的各个步骤,让自动化更高效,也更容易理解。
我该怎么选择合适的模式?
指南详细说明了 5 种模式各自适用的具体情况,你可以根据自动化需要完成的任务来做决定。
什么是“常见组件”?
它们是很多工作流中都会出现的基础模块,比如触发器(启动条件)、数据源、数据转换和输出结果。
详情
作者的原始描述
Proven architectural patterns for building n8n workflows.
热度
- GitHub 星标
- 48k
- 排名
- #5278
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。