Token导航 LogoToken导航

Agent Skill · 前端设计

n8n(n8n 自动化)

n8n 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

n8n 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,第三方扫描有提醒项,按安装量在前端设计类的 10,216 个 Skill 里排第 897。

总安装 10,060周安装 415GitHub Stars 14下载 3,287核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/vladm3105/aidoc-flow-framework --skill n8n

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

在 n8n 平台上设计和部署自动化工作流程、自定义节点和集成。

支持跨 API、数据库、云服务和通信工具的 500 多个本机集成,以及 TypeScript 中用于组织特定逻辑的自定义节点 包括数据操作的核心节点类型(Code、Set、If、Switch、Merge)、触发器(Webhook、Schedule、Manual、Error)和 AI 操作(LangChain 代理、向量存储、文档加载器) 提供多种执行模型:手动、Webhook、计划、基于事件和错误触发的工作流程以及模块化子工作流程模式 提供 JavaScript 和 Python 中的代码节点执行,以进行内联转换、API 调用和数据处理,而无需构建自定义节点 涵盖自托管和云部署选项,包括队列模式扩展、数据库配置 (SQLite/PostgreSQL/MySQL) 以及大容量自动化的监控策略

来源仓库内路径:skills/n8n

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/vladm3105/aidoc-flow-framework --skill n8n;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

n8n 怎么安装?

在终端执行 npx skills add https://github.com/vladm3105/aidoc-flow-framework --skill n8n。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

n8n 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

n8n 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

n8n 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

n8n 用的人多吗?

公开数据是累计安装 10,060 次,近一周安装 415 次,下载 3,287 次,GitHub 14 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

n8n 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
n8n

n8n 自动化 · 本页

10,06014接触敏感数据MIT有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

n8n Workflow Automation Skill

Purpose

Provide specialized guidance for developing workflows, custom nodes, and integrations on the n8n automation platform. Enable AI assistants to design workflows, write custom code nodes, build TypeScript-based custom nodes, integrate external services, and implement AI agent patterns.

When to Use This Skill

Invoke this skill when:

  • Designing automation workflows combining multiple services
  • Writing JavaScript/Python code within workflow nodes
  • Building custom nodes in TypeScript
  • Integrating APIs, databases, and cloud services
  • Creating AI agent workflows with LangChain
  • Troubleshooting workflow execution errors
  • Planning self-hosted n8n deployments
  • Converting manual processes to automated workflows

Do NOT use this skill for:

  • Generic automation advice (use appropriate language/platform skill)
  • Cloud platform-specific integrations (combine with cloud provider skill)
  • Database design (use database-specialist skill)
  • Frontend development (n8n has minimal UI customization)

Core n8n Concepts

Platform Architecture

Runtime Environment:

  • Node.js-based execution engine
  • TypeScript (90.7%) and Vue.js frontend
  • pnpm monorepo structure
  • Self-hosted or cloud deployment options

Workflow Execution Models:

  1. Manual trigger - User-initiated execution
  2. Webhook trigger - HTTP endpoint activation
  3. Schedule trigger - Cron-based timing
  4. Event trigger - External service events (database changes, file uploads)
  5. Error trigger - Workflow failure handling

Fair-code License:

  • Apache 2.0 with Commons Clause
  • Free for self-hosting and unlimited executions
  • Commercial restrictions for SaaS offerings

Node Types and Categories

Core Nodes (Data manipulation):

  • Code - Execute JavaScript/Python
  • Set - Assign variable values
  • If - Conditional branching
  • Switch - Multi-branch routing
  • Merge - Combine data streams
  • Split In Batches - Process large datasets incrementally
  • Loop Over Items - Iterate through data

Trigger Nodes (Workflow initiation):

  • Webhook - HTTP endpoint
  • Schedule - Time-based execution
  • Manual Trigger - User activation
  • Error Trigger - Catch workflow failures
  • Start - Default entry point

Action Nodes (500+ integrations):

  • API connectors (REST, GraphQL, SOAP)
  • Database clients (PostgreSQL, MongoDB, MySQL, Redis)
  • Cloud services (AWS, GCP, Azure, Cloudflare)
  • Communication (Email, Slack, Discord, SMS)
  • File operations (FTP, S3, Google Drive, Dropbox)
  • Authentication (OAuth2, API keys, JWT)

AI Nodes (LangChain integration):

  • AI Agent - Autonomous decision-making
  • AI Chain - Sequential LLM operations
  • AI Transform - Data manipulation with LLMs
  • Vector Store - Embedding storage and retrieval
  • Document Loaders - Text extraction from files

Data Flow and Connections

Connection Types:

  1. Main connection - Primary data flow (solid line)
  2. Error connection - Failure routing (dashed red line)

Data Structure:

// Input/output format for all nodes
[
  {
    json: { /* Your data object */ },
    binary: { /* Optional binary data (files, images) */ },
    pairedItem: { /* Reference to source item */ }
  }
]

Data Access Patterns:

  • Expression - {{$json.field}} (current node output)
  • Input reference - {{$('NodeName').item.json.field}} (specific node)
  • All items - {{$input.all()}} (entire dataset)
  • First item - {{$input.first()}} (single item)
  • Item index - {{$itemIndex}} (current iteration)

Credentials and Authentication

Credential Types:

  • Predefined - Pre-configured for popular services (OAuth2, API key)
  • Generic - HTTP authentication (Basic, Digest, Header Auth)
  • Custom - User-defined credential structures

Security Practices:

  • Credentials stored encrypted in database
  • Environment variable support for sensitive values
  • Credential sharing across workflows (optional)
  • Rotation: Manual update required

Workflow Design Methodology

Planning Phase

Step 1: Define Requirements

  • Input sources (webhooks, schedules, databases)
  • Data transformations needed
  • Output destinations (APIs, files, databases)
  • Error handling requirements
  • Execution frequency and volume

Step 2: Map Data Flow

  • Identify trigger events
  • List transformation steps
  • Specify validation rules
  • Define branching logic
  • Plan error recovery

Step 3: Select Nodes

Decision criteria:

  • Use native nodes when available (optimized, maintained)
  • Use Code node for custom logic <50 lines
  • Build custom node for reusable complex logic >100 lines
  • Use HTTP Request node for APIs without native nodes
  • Use Execute Command node for system operations (security risk)

Implementation Phase

Workflow Structure Pattern:

[Trigger] → [Validation] → [Branch (If/Switch)] → [Processing] → [Error Handler]
                                ↓                      ↓
                          [Path A nodes]        [Path B nodes]
                                ↓                      ↓
                          [Merge/Output]         [Output]

Modular Design:

  • Extract reusable logic to sub-workflows
  • Use Execute Workflow node for modularity
  • Limit main workflow to 15-20 nodes (readability)
  • Parameterize workflows with input variables

Error Handling Strategy:

  1. Error Trigger workflows - Capture all failures
  2. Try/Catch pattern - Error output connections on nodes
  3. Retry logic - Configure per-node retry settings
  4. Validation nodes - If/Switch for data checks
  5. Notification - Alert on critical failures (Email, Slack)

Testing Phase

Local Testing:

  • Execute with sample data
  • Verify each node output (inspect data panel)
  • Test error paths with invalid data
  • Check credential connections

Production Validation:

  • Enable workflow, monitor executions
  • Review execution history for failures
  • Check resource usage (execution time, memory)
  • Validate output data quality

Code Execution in Workflows

Code Node (JavaScript)

Available APIs:

  • Node.js built-ins - fs, path, crypto, https
  • Lodash - _.groupBy(), _.sortBy(), etc.
  • Luxon - DateTime manipulation
  • n8n helpers - $input, $json, $binary

Basic Structure:

// Access input items
const items = $input.all();

// Process data
const processedItems = items.map(item => {
  const inputData = item.json;

  return {
    json: {
      // Output fields
      processed: inputData.field.toUpperCase(),
      timestamp: new Date().toISOString()
    }
  };
});

// Return transformed items
return processedItems;

Data Transformation Patterns:

*Filtering:*

const items = $input.all();
return items.filter(item => item.json.status === 'active');

*Aggregation:*

const items = $input.all();
const grouped = _.groupBy(items, item => item.json.category);

return [{
  json: {
    summary: Object.keys(grouped).map(category => ({
      category,
      count: grouped[category].length
    }))
  }
}];

*API calls (async):*

const items = $input.all();
const results = [];

for (const item of items) {
  const response = await fetch(`https://api.example.com/data/${item.json.id}`);
  const data = await response.json();

  results.push({
    json: {
      original: item.json,
      enriched: data
    }
  });
}

return results;

Error Handling in Code:

const items = $input.all();

return items.map(item => {
  try {
    // Risky operation
    const result = JSON.parse(item.json.data);
    return { json: { parsed: result } };
  } catch (error) {
    return {
      json: {
        error: error.message,
        original: item.json.data
      }
    };
  }
});

Code Node (Python)

Available Libraries:

  • Standard library - json, datetime, re, requests
  • NumPy - Array operations
  • Pandas - Data analysis (if installed)

Basic Structure:

# Access input items
items = _input.all()

# Process data
processed_items = []
for item in items:
    input_data = item['json']

    processed_items.append({
        'json': {
            'processed': input_data['field'].upper(),
            'timestamp': datetime.now().isoformat()
        }
    })

# Return transformed items
return processed_items

Complexity Rating: Code Nodes

  • Simple transformations (map/filter): 1
  • API calls with error handling: 2
  • Multi-step async operations: 3
  • Complex algorithms with libraries: 4
  • Performance-critical processing: 5 (consider custom node)

Custom Node Development

When to Build Custom Nodes

Build custom node when:

  • Reusable logic across multiple workflows (>3 workflows)
  • Complex authentication requirements
  • Performance-critical operations (Code node overhead)
  • Community contribution (public npm package)
  • Organization-specific integrations

Use Code node when:

  • One-off transformations
  • Rapid prototyping
  • Simple API calls (<100 lines)

Development Styles

[See Code Examples: examples/n8n_custom_node.ts]

1. Programmatic Style (Full control)

*Use for:*

  • Complex authentication flows
  • Advanced parameter validation
  • Custom UI components
  • Polling operations with state management

[See: CustomNode class in examples/n8n_custom_node.ts]

2. Declarative Style (Simplified)

*Use for:*

  • Standard CRUD operations
  • RESTful API wrappers
  • Simple integrations without complex logic

[See: operations and router exports in examples/n8n_custom_node.ts]

Additional Examples:

  • Credential configuration: customApiCredentials in examples/n8n_custom_node.ts
  • Credential validation: validateCredentials() in examples/n8n_custom_node.ts
  • Polling trigger: PollingTrigger class in examples/n8n_custom_node.ts

Development Workflow

Step 1: Initialize Node

# Create from template
npm create @n8n/node my-custom-node

# Directory structure created:
# ├── nodes/
# │   └── MyCustomNode/
# │       └── MyCustomNode.node.ts
# ├── credentials/
# │   └── MyCustomNodeApi.credentials.ts
# └── package.json

Step 2: Implement Logic

  • Define node properties (parameters, credentials)
  • Implement execute method
  • Add error handling
  • Write unit tests (optional)

Step 3: Build and Test

# Build TypeScript
npm run build

# Link locally for testing
npm link

# In n8n development environment
cd ~/.n8n/nodes
npm link my-custom-node

# Restart n8n to load node
n8n start

Step 4: Publish

# Community node (npm package)
npm publish

# Install in n8n
Settings → Community Nodes → Install → Enter package name

Complexity Rating: Custom Nodes

  • Declarative CRUD wrapper: 2
  • Programmatic with authentication: 3
  • Complex state management: 4
  • Advanced polling/webhooks: 5

Integration Patterns

API Integration Strategy

Decision Tree:

Has native node? ──Yes──> Use native node
     │
     No
     ├──> Simple REST API? ──Yes──> HTTP Request node
     ├──> Complex auth (OAuth2)? ──Yes──> Build custom node
     ├──> Reusable across workflows? ──Yes──> Build custom node
     └──> One-off integration? ──Yes──> Code node with fetch()

HTTP Request Node Patterns

GET with query parameters:

URL: https://api.example.com/users
Method: GET
Query Parameters:
  - status: active
  - limit: 100
Authentication: Header Auth
  - Name: Authorization
  - Value: Bearer {{$credentials.apiKey}}

POST with JSON body:

URL: https://api.example.com/users
Method: POST
Body Content Type: JSON
Body:
{
  "name": "={{ $json.name }}",
  "email": "={{ $json.email }}"
}

Pagination handling (Code node):

let allResults = [];
let page = 1;
let hasMore = true;

while (hasMore) {
  const response = await this.helpers.request({
    method: 'GET',
    url: `https://api.example.com/data?page=${page}`,
    json: true,
  });

  allResults = allResults.concat(response.results);
  hasMore = response.hasNext;
  page++;
}

return allResults.map(item => ({ json: item }));

Webhook Patterns

Receiving webhooks:

  1. Create webhook trigger node
  2. Configure HTTP method (POST/GET)
  3. Set authentication (None/Header Auth/Basic Auth)
  4. Get webhook URL from node
  5. Register URL with external service

Responding to webhooks:

// In Code node after webhook trigger
const webhookData = $input.first().json;

// Process data
const result = processData(webhookData);

// Return response (synchronous webhook)
return [{
  json: {
    status: 'success',
    data: result
  }
}];

Webhook URL structure:

Production: https://your-domain.com/webhook/workflow-id
Test: https://your-domain.com/webhook-test/workflow-id

Database Integration

Common patterns:

*Query with parameters:*

-- PostgreSQL node
SELECT * FROM users
WHERE created_at > $1
  AND status = $2
ORDER BY created_at DESC

-- Parameters from previous node
Parameters: ['{{ $json.startDate }}', 'active']

*Batch insert:*

// Code node preparing data for database
const items = $input.all();
const values = items.map(item => ({
  name: item.json.name,
  email: item.json.email,
  created_at: new Date().toISOString()
}));

return [{ json: { values } }];

// Next node: PostgreSQL
// INSERT INTO users (name, email, created_at)
// VALUES {{ $json.values }}

File Operations

Upload to S3:

Workflow: File Trigger → S3 Upload
- File Trigger: Monitor directory for new files
- S3 node:
  - Operation: Upload
  - Bucket: my-bucket
  - File Name: {{ $json.fileName }}
  - Binary Data: true (from file trigger)

Download and process:

HTTP Request (download) → Code (process) → Google Drive (upload)
- HTTP Request: Binary response enabled
- Code: Process $binary.data
- Google Drive: Upload with binary data

AI Agent Workflows

LangChain Integration

AI Agent Node Configuration:

  • Agent type: OpenAI Functions, ReAct, Conversational
  • LLM: OpenAI, Anthropic, Hugging Face, Ollama (local)
  • Memory: Buffer, Buffer Window, Summary
  • Tools: Calculator, Webhook, Database query, Custom API calls

Basic Agent Pattern:

Manual Trigger → AI Agent → Output
- AI Agent:
  - Prompt: "You are a helpful assistant that {{$json.task}}"
  - Tools: [Calculator, HTTP Request]
  - Memory: Conversation Buffer Window

Gatekeeper Pattern (Supervised AI)

Use case: Human approval before agent actions

Webhook → AI Agent → If (requires approval) → Send Email → Wait for Webhook → Execute Action
                            ↓ (auto-approve)
                        Execute Action

Implementation:

  1. AI Agent generates action plan
  2. If node checks confidence score
  3. Low confidence → Email approval request
  4. Wait for webhook (approve/reject)
  5. Execute or abort based on response

Iterative Agent Pattern

Use case: Multi-step problem solving with state

Loop Start → AI Agent → Tool Execution → State Update → Loop End (condition check)
     ↑______________________________________________________________|

State management:

// Code node - Initialize state
return [{
  json: {
    task: 'Research topic',
    iteration: 0,
    maxIterations: 5,
    context: [],
    completed: false
  }
}];

// Code node - Update state
const state = $json;
state.iteration++;
state.context.push($('AI Agent').item.json.response);
state.completed = state.iteration >= state.maxIterations || checkGoalMet(state);

return [{ json: state }];

RAG (Retrieval Augmented Generation) Pattern

Query Input → Vector Store Search → Format Context → LLM → Response Output

Vector Store setup:

  1. Document Loader node → Split text into chunks
  2. Embeddings node → Generate vectors (OpenAI, Cohere)
  3. Vector Store node → Store in Pinecone/Qdrant/Supabase
  4. Query: Retrieve relevant chunks → Inject into LLM prompt

Complexity Rating: AI Workflows

  • Simple LLM call: 1
  • Agent with tools: 3
  • Gatekeeper pattern: 4
  • Multi-agent orchestration: 5

Deployment and Hosting

Self-Hosting Options

[See Code Examples: examples/n8n_deployment.yaml]

Docker (Recommended):

  • Docker Compose with PostgreSQL
  • Queue mode configuration for scaling
  • Resource requirements by volume

[See: docker-compose configurations in examples/n8n_deployment.yaml]

npm (Development):

npm install n8n -g
n8n start
# Access: http://localhost:5678

Environment Configuration:

[See: Complete environment variable reference in examples/n8n_deployment.yaml]

Essential variables:

  • N8N_HOST - Public URL for webhooks
  • WEBHOOK_URL - Webhook endpoint base
  • N8N_ENCRYPTION_KEY - Credential encryption (must persist)
  • DB_TYPE - Database (SQLite/PostgreSQL/MySQL/MariaDB)
  • EXECUTIONS_DATA_SAVE_ON_ERROR - Error logging
  • EXECUTIONS_DATA_SAVE_ON_SUCCESS - Success logging

Performance tuning variables documented in examples/n8n_deployment.yaml

Scaling Considerations

Queue Mode (High volume):

# Separate main and worker processes
# Main process (UI + queue management)
N8N_QUEUE_MODE=main n8n start

# Worker processes (execution only)
N8N_QUEUE_MODE=worker n8n worker

Database:

  • SQLite: Development/low volume (<1000 executions/day)
  • PostgreSQL: Production (recommended)
  • MySQL/MariaDB: Alternative for existing infrastructure

Resource Requirements:

Workflow VolumeCPURAMDatabase
<100 exec/day1 core512MBSQLite
100-1000/day2 cores2GBPostgreSQL
1000-10000/day4 cores4GBPostgreSQL
>10000/day8+ cores8GB+PostgreSQL + Queue mode

Monitoring:

  • Enable execution logs (EXECUTIONS_DATA_SAVE_*)
  • Set up error workflows (Error Trigger node)
  • Monitor database size (execution history cleanup)
  • Track webhook response times

Best Practices

Workflow Design

1. Modularity:

  • Extract reusable logic to Execute Workflow nodes
  • Limit workflows to single responsibility
  • Use sub-workflows for common operations (validation, formatting)

2. Error Resilience:

  • Add error outputs to critical nodes
  • Implement retry logic (node settings)
  • Create Error Trigger workflows for alerts
  • Log errors to external systems (Sentry, CloudWatch)

3. Performance:

  • Use Split In Batches for large datasets (>1000 items)
  • Minimize HTTP requests in loops (batch API calls)
  • Disable execution logging for high-frequency workflows
  • Cache expensive operations in variables

4. Security:

  • Store secrets in credentials (not hardcoded)
  • Use environment variables for configuration
  • Enable webhook authentication
  • Restrict Execute Command node usage (or disable globally)
  • Review code nodes for injection vulnerabilities

5. Maintainability:

  • Add notes to complex workflows (Sticky Note node)
  • Use consistent naming (verb + noun: "Fetch Users", "Transform Data")
  • Document workflow purpose in workflow settings
  • Version control workflows (export JSON, commit to Git)

Code Quality in Nodes

1. Data validation:

// Always validate input structure
const items = $input.all();

for (const item of items) {
  if (!item.json.email || !item.json.name) {
    throw new Error(`Invalid input: missing required fields at item ${item.json.id}`);
  }
}

2. Error context:

// Provide debugging information
try {
  const result = await apiCall(item.json.id);
} catch (error) {
  throw new Error(`API call failed for ID ${item.json.id}: ${error.message}`);
}

3. Idempotency:

// Check existence before creation
const exists = await checkExists(item.json.uniqueId);
if (!exists) {
  await createRecord(item.json);
}

Workflow Pattern Library

Pattern 1: API Sync

Use case: Sync data between two systems

Schedule Trigger (hourly) → Fetch Source Data → Transform → If (record exists) → Update Target
                                                                    ↓ (new)
                                                                Create in Target

Complexity: 2

Pattern 2: Error Recovery

Use case: Retry failed operations with exponential backoff

Main Workflow → Process → Error → Error Trigger Workflow
                                        ↓
                                   Wait (delay) → Retry → If (max retries) → Alert

Complexity: 3

Pattern 3: Data Enrichment

Use case: Augment data with external sources

Webhook → Split In Batches → For Each Item:
                                  ↓
                             API Call (enrich) → Code (merge) → Batch Results
                                                                      ↓
                                                                Database Insert

Complexity: 3

Pattern 4: Event-Driven Processing

Use case: Process events from message queue

SQS Trigger → Parse Message → Switch (event type) → [Handler A, Handler B, Handler C] → Confirm/Delete Message

Complexity: 3

Pattern 5: Human-in-the-Loop

Use case: Approval workflow

Trigger → Generate Request → Send Email (approval link) → Webhook (approval response) → If (approved) → Execute Action
                                                                                              ↓ (rejected)
                                                                                         Send Rejection Notice

Complexity: 4

Pattern 6: Multi-Stage ETL

Use case: Complex data pipeline

Schedule → Extract (API) → Validate → Transform → Load (Database) → Success Notification
                               ↓                                            ↓
                          Error Handler ────────────────────> Error Notification

Complexity: 3

Quality Gates

Definition of Done: Workflows

A workflow is production-ready when:

  1. Functionality:

- ✓ All nodes execute without errors on test data - ✓ Error paths tested with invalid input - ✓ Output format validated against requirements

  1. Error Handling:

- ✓ Error outputs configured on critical nodes - ✓ Error Trigger workflow created for alerts - ✓ Retry logic configured where applicable

  1. Security:

- ✓ Credentials used (no hardcoded secrets) - ✓ Webhook authentication enabled - ✓ Input validation implemented

  1. Documentation:

- ✓ Workflow description filled in settings - ✓ Complex logic documented with notes - ✓ Parameter descriptions clear

  1. Performance:

- ✓ Tested with realistic data volume - ✓ Execution time acceptable - ✓ Resource usage within limits

Definition of Done: Custom Nodes

A custom node is production-ready when:

  1. Functionality:

- ✓ All operations implemented and tested - ✓ Credentials integration working - ✓ Parameters validated

  1. Code Quality:

- ✓ TypeScript types defined - ✓ Error handling comprehensive - ✓ No hardcoded values (use parameters)

  1. Documentation:

- ✓ README with installation instructions - ✓ Parameter descriptions clear - ✓ Example workflows provided

  1. Distribution:

- ✓ Published to npm (if public) - ✓ Versioned appropriately - ✓ Dependencies declared in package.json

Error Handling Guide

Common Issues and Resolutions

Issue: Workflow fails with "Invalid JSON"

  • Cause: Node output not in correct format
  • Resolution: // Ensure return format return [{json: {your: 'data'}}]; // NOT: return {your: 'data'};

Issue: "Cannot read property of undefined"

  • Cause: Missing data from previous node
  • Resolution: // Check existence before access const value = $json.field?.subfield?? 'default';

Issue: Webhook not receiving data

  • Cause: Incorrect webhook URL or authentication
  • Resolution:

- Verify URL matches external service configuration - Check authentication method matches (None/Header/Basic) - Test with curl: curl -X POST https://your-n8n.com/webhook/test \ -H "Content-Type: application/json" \ -d '{"test": "data"}'

Issue: Custom node not appearing

  • Cause: Not properly linked/installed
  • Resolution: # Check installation npm list -g | grep n8n-nodes- # Reinstall if needed npm install -g n8n-nodes-your-node # Restart n8n

Issue: High memory usage

  • Cause: Processing large datasets without batching
  • Resolution:

- Use Split In Batches node (batch size: 100-1000) - Disable execution data saving for high-frequency workflows - Set EXECUTIONS_DATA_PRUNE=true

Issue: Credentials not working

  • Cause: Incorrect credential configuration or expired tokens
  • Resolution:

- Re-authenticate OAuth2 credentials - Verify API key/token validity - Check credential permissions in service

Debugging Strategies

1. Inspect node output:

  • Click node → View executions data
  • Check json and binary tabs
  • Verify data structure matches expectations

2. Add debug Code nodes:

// Log intermediate values
const data = $json;
console.log('Debug data:', JSON.stringify(data, null, 2));
return [{ json: data }];

3. Use If node for validation:

// Expression to check data quality
{{ $json.email && $json.email.includes('@') }}

4. Enable execution logging:

  • Settings → Log → Set level to debug
  • Check docker logs: docker logs n8n -f

5. Test in isolation:

  • Create test workflow with Manual Trigger
  • Copy problematic nodes
  • Use static test data

References

Official Documentation

Code Repositories

Community Resources

Related Skills

  • For cloud integrations: Use cloud-devops-expert skill
  • For database design: Use database-specialist skill
  • For API design: Use api-design-architect skill
  • For TypeScript development: Use language-specific skills

Version: 1.0.0 Last Updated: 2025-11-13 Complexity Rating: 3 (Moderate - requires platform-specific knowledge) Estimated Learning Time: 8-12 hours for proficiency

平台分布

Claude Code

28.91%
按下载量换算950

Cursor

22.52%
按下载量换算740

Antigravity

17.23%
按下载量换算566

Gemini CLI

12.14%
按下载量换算399

OpenCode

7.54%
按下载量换算248

Codex

3.38%
按下载量换算111

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills