Chuyển đến nội dung
Skillpedia
Tự động hóa33k · #9114

n8n-workflow-patterns

Skill này làm gì

Skill này cung cấp cho agent AI năm mẫu kiến trúc đã được kiểm thử để xây dựng tự động hóa n8n. Skill dành cho người thiết kế workflow n8n mới và muốn có một cấu trúc khởi đầu vững chắc.

Khi nào nên dùng

  • ✓Khi bạn bắt đầu một workflow n8n mới và cần chọn cấu trúc.
  • ✓Khi bạn muốn một workflow phản ứng với sự kiện webhook gửi đến, chẳng hạn một form được gửi.
  • ✓Khi bạn cần một workflow định kỳ lấy dữ liệu, xử lý và gửi báo cáo.

Liên kết skill

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/workflow-automation/n8n/n8n-workflow-patterns/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/workflow-automation/n8n/n8n-workflow-patterns/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Cấu trúc n8n nào phù hợp nhất cho một workflow nhận các form gửi đến và cập nhật cơ sở dữ liệu?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent so sánh mục tiêu của bạn với năm mẫu, đề xuất mẫu phù hợp nhất, rồi giải thích các bước để xây dựng nó.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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
  2. HTTP API Integration

    • Fetch from REST APIs → Transform → Store/Use
    • Pattern: Trigger → HTTP Request → Transform → Action → Error Handler
  3. Database Operations

    • Read/Write/Sync database data
    • Pattern: Schedule → Query → Transform → Write → Verify
  4. AI Agent Workflow

    • AI agents with tools and memory
    • Pattern: Trigger → AI Agent (Model + Tools + Memory) → Output
  5. 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_operation)
  • 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 ⚠️ Manual activation required in n8n UI (API/MCP cannot activate)
  • 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 
Câu hỏi thường gặp

Năm mẫu đó là gì?

Đó là xử lý webhook, tích hợp API HTTP, thao tác cơ sở dữ liệu, workflow agent AI và tác vụ định kỳ.

Mẫu nào phổ biến nhất?

Skill cho biết xử lý webhook là mẫu phổ biến nhất.

Skill có bao gồm agent AI trong n8n không?

Có. Skill có một mẫu agent AI gồm mô hình, công cụ và bộ nhớ.

Chi tiết

Mô tả gốc của tác giả

Proven workflow architectural patterns from real n8n workflows. Use when building new workflows, designing workflow structure, choosing workflow patterns, planning workflow architecture, or asking about webhook processing, HTTP API integration, database operations, AI agent workflows, or scheduled tasks.

repo: davila7/claude-code-templates

Độ phổ biến

Sao GitHub
33k
Vị trí xếp hạng
#9114
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự