Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计提醒

n8n-workflow-patternsn8n 工作流程模式

Agent Skill

n8n-workflow-patterns 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

416

周安装

17

GitHub Stars

62

下载量

135
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:n8n-workflow-patterns(n8n 工作流程模式)
来源仓库:https://github.com/profsynapse/pact-plugin
仓库路径:skills/n8n-workflow-patterns
安装命令:
npx skills add https://github.com/profsynapse/pact-plugin --skill n8n-workflow-patterns
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/profsynapse/pact-plugin --skill n8n-workflow-patterns

简介

要点:

  • 5 个核心模式覆盖 90% 以上的工作流程用例
  • Webhook 处理是最常见的模式
  • 对每个工作流程使用工作流程创建清单
  • 规划模式→选择节点→构建→验证→部署
  • 与其他技能集成以实现完整的工作流程开发
  • 后续步骤:
  • 确定您的用例模式
  • 阅读详细的模式文件
  • 使用n8n MCP Tools Expert查找节点
  • 遵循工作流创建清单
  • 使用n8n Validation Expert进行验证
  • 相关技能:
  • n8n MCP Tools Expert - 查找和配置节点
  • n8n 表达式语法 - 正确编写表达式
  • n8n 验证专家 - 验证并修复错误
  • n8n节点配置-配置具体操作
  • 每周安装量
  • 17 号
  • 存储库
  • profsynapse/pact-插件
  • GitHub 之星
  • 62
  • 第一次看到
  • 2026 年 2 月 26 日
  • 安全审计
  • Gen Agent Trust Hub 通行证
  • 套接字通行证
  • 斯尼克警告

SKILL.md

n8n Workflow Patterns

Proven architectural patterns for building n8n workflows.


The 5 Core Patterns

Based on analysis of real workflow usage:

  1. Webhook Processing (Most Common)

- Receive HTTP requests → Process → Output - Pattern: Webhook → Validate → Transform → Respond/Notify

  1. HTTP API Integration

- Fetch from REST APIs → Transform → Store/Use - Pattern: Trigger → HTTP Request → Transform → Action → Error Handler

  1. Database Operations

- Read/Write/Sync database data - Pattern: Schedule → Query → Transform → Write → Verify

  1. AI Agent Workflow

- AI agents with tools and memory - Pattern: Trigger → AI Agent (Model + Tools + Memory) → Output

  1. 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 activateWorkflow operation
  • 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

Trigger → [Branch 1] → Merge
       └→ [Branch 2] ↗

Use when: Independent operations that can run simultaneously

Loop Pattern

Trigger → Split in Batches → Process → Loop (until done)

Use when: Processing large datasets in chunks

Error Handler Pattern

Main Flow → [Success Path]
         └→ [Error Trigger → Error Handler]

Use when: Need separate error handling workflow


Common Gotchas

1. Webhook Data Structure

Problem: Can't access webhook payload data

Solution: Data is nested under $json.body

❌ {{$json.email}}
✅ {{$json.body.email}}

See: n8n Expression Syntax skill

2. Multiple Input Items

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

3. Authentication Issues

Problem: API calls failing with 401/403

Solution:

  • Configure credentials properly
  • Use the "Credentials" section, not parameters
  • Test credentials before workflow activation

4. Node Execution Order

Problem: Nodes executing in unexpected order

Solution: Check workflow settings → Execution Order

  • v0: Top-to-bottom (legacy)
  • v1: Connection-based (recommended)

5. Expression Errors

Problem: Expressions showing as literal text

Solution: Use {{}} around expressions

  • See n8n Expression Syntax skill for details

Integration with Other Skills

These skills work together with Workflow Patterns:

n8n MCP Tools Expert - Use to:

  • Find nodes for your pattern (search_nodes)
  • Understand node operations (get_node)
  • Create workflows (n8n_create_workflow)
  • Deploy templates (n8n_deploy_template)
  • Use ai_agents_guide for AI pattern guidance

n8n Expression Syntax - Use to:

  • Write expressions in transformation nodes
  • Access webhook data correctly ({{$json.body.field}})
  • Reference previous nodes ({{$node["Node Name"].json.field}})

n8n Node Configuration - Use to:

  • Configure specific operations for pattern nodes
  • Understand node-specific requirements

n8n Validation Expert - Use to:

  • Validate workflow structure
  • Fix validation errors
  • Ensure workflow correctness before deployment

Pattern Statistics

Common workflow patterns:

Most Common Triggers:

  1. Webhook - 35%
  2. Schedule (periodic tasks) - 28%
  3. Manual (testing/admin) - 22%
  4. Service triggers (Slack, email, etc.) - 15%

Most Common Transformations:

  1. Set (field mapping) - 68%
  2. Code (custom logic) - 42%
  3. IF (conditional routing) - 38%
  4. Switch (multi-condition) - 18%

Most Common Outputs:

  1. HTTP Request (APIs) - 45%
  2. Slack - 32%
  3. Database writes - 28%
  4. Email - 24%

Average Workflow Complexity:

  • Simple (3-5 nodes): 42%
  • Medium (6-10 nodes): 38%
  • Complex (11+ nodes): 20%

Quick Start Examples

Example 1: Simple Webhook → Slack

1. Webhook (path: "form-submit", POST)
2. Set (map form fields)
3. Slack (post message to #notifications)

Example 2: Scheduled Report

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)

Example 3: Database Sync

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)

Example 4: AI Assistant

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)

Example 5: API Integration

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)

Detailed Pattern Files

For comprehensive guidance on each pattern:


Real Template Examples

From n8n template library:

Template #2947: Weather to Slack

  • Pattern: Scheduled Task
  • Nodes: Schedule → HTTP Request (weather API) → Set → Slack
  • Complexity: Simple (4 nodes)

Webhook Processing: Most common pattern

  • Most common: Form submissions, payment webhooks, chat integrations

HTTP API: Common pattern

  • Most common: Data fetching, third-party integrations

Database Operations: Common pattern

  • Most common: ETL, data sync, backup workflows

AI Agents: Growing in usage

  • Most common: Chatbots, content generation, data analysis

Use search_templates and get_template from n8n-mcp tools to find examples!


Best Practices

✅ Do

  • Start with the simplest pattern that solves your problem
  • Plan your workflow structure before building
  • Use error handling on all workflows
  • Test with sample data before activation
  • Follow the workflow creation checklist
  • Use descriptive node names
  • Document complex workflows (notes field)
  • Monitor workflow executions after deployment

❌ Don't

  • Build workflows in one shot (iterate! avg 56s between edits)
  • Skip validation before activation
  • Ignore error scenarios
  • Use complex patterns when simple ones suffice
  • Hardcode credentials in parameters
  • Forget to handle empty data cases
  • Mix multiple patterns without clear boundaries
  • Deploy without testing

Summary

Key Points:

  1. 5 core patterns cover 90%+ of workflow use cases
  2. Webhook processing is the most common pattern
  3. Use the workflow creation checklist for every workflow
  4. Plan patternSelect nodesBuildValidateDeploy
  5. Integrate with other skills for complete workflow development

Next Steps:

  1. Identify your use case pattern
  2. Read the detailed pattern file
  3. Use n8n MCP Tools Expert to find nodes
  4. Follow the workflow creation checklist
  5. Use n8n Validation Expert to validate

Related Skills:

  • n8n MCP Tools Expert - Find and configure nodes
  • n8n Expression Syntax - Write expressions correctly
  • n8n Validation Expert - Validate and fix errors
  • n8n Node Configuration - Configure specific operations

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.59%
按下载量换算48

Claude

32.43%
按下载量换算44

Cursor

19.86%
按下载量换算27

Gemini CLI

10.02%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills