🛠️ N8nワークフローパターン集
n8nという自動化ツールで、効率的かつ
📺 まず動画で見る(YouTube)
▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
Proven architectural patterns for building n8n workflows.
🇯🇵 日本人クリエイター向け解説
n8nという自動化ツールで、効率的かつ
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o n8n-workflow-patterns.zip https://jpskill.com/download/3196.zip && unzip -o n8n-workflow-patterns.zip && rm n8n-workflow-patterns.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/3196.zip -OutFile "$d\n8n-workflow-patterns.zip"; Expand-Archive "$d\n8n-workflow-patterns.zip" -DestinationPath $d -Force; ri "$d\n8n-workflow-patterns.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
n8n-workflow-patterns.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
n8n-workflow-patternsフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
💬 こう話しかけるだけ — サンプルプロンプト
- › N8n Workflow Patterns を使って、最小構成のサンプルコードを示して
- › N8n Workflow Patterns の主な使い方と注意点を教えて
- › N8n Workflow Patterns を既存プロジェクトに組み込む方法を教えて
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
n8n ワークフローパターン
n8n ワークフローを構築するための、実績のあるアーキテクチャパターンです。
使用する場面
- ワークフローを構築する前に、n8n ワークフローのアーキテクチャパターンを選択する必要がある場合。
- タスクに、Webhook 処理、API 統合、スケジュールされたジョブ、データベース同期、または AI エージェントワークフローの設計が含まれる場合。
- ノードごとのトラブルシューティングではなく、高レベルのワークフロー構造が必要な場合。
5つのコアパターン
実際のワークフローの使用状況の分析に基づいています。
-
Webhook 処理 (最も一般的)
- HTTP リクエストを受信 → 処理 → 出力
- パターン: Webhook → 検証 → 変換 → 応答/通知
-
[HTTP API 統合]
- REST API からフェッチ → 変換 → 保存/使用
- パターン: トリガー → HTTP リクエスト → 変換 → アクション → エラーハンドラー
-
データベース操作
- データベースデータの読み取り/書き込み/同期
- パターン: スケジュール → クエリ → 変換 → 書き込み → 検証
-
AI エージェントワークフロー
- ツールとメモリを備えた AI エージェント
- パターン: トリガー → AI エージェント (モデル + ツール + メモリ) → 出力
-
スケジュールされたタスク
- 定期的な自動化ワークフロー
- パターン: スケジュール → フェッチ → 処理 → 配信 → ログ
パターン選択ガイド
各パターンの使用時期:
Webhook 処理 - 次の場合に使用します。
- 外部システムからデータを受信する場合
- 統合 (Slack コマンド、フォーム送信、GitHub Webhook) を構築する場合
- イベントへの即時応答が必要な場合
- 例: 「Stripe 支払い Webhook を受信 → データベースを更新 → 確認を送信」
HTTP API 統合 - 次の場合に使用します。
- 外部 API からデータをフェッチする場合
- サードパーティサービスと同期する場合
- データパイプラインを構築する場合
- 例: 「GitHub の課題をフェッチ → 変換 → Jira チケットを作成」
データベース操作 - 次の場合に使用します。
- データベース間の同期
- スケジュールに基づいてデータベースクエリを実行する場合
- ETL ワークフロー
- 例: 「Postgres レコードを読み取り → 変換 → MySQL に書き込み」
AI エージェントワークフロー - 次の場合に使用します。
- 会話型 AI を構築する場合
- ツールアクセスを備えた AI が必要な場合
- 多段階の推論タスク
- 例: 「ドキュメントを検索したり、データベースをクエリしたり、メールを送信したりできる AI とチャット」
スケジュールされたタスク - 次の場合に使用します。
- 定期的なレポートまたは要約
- 定期的なデータフェッチ
- メンテナンス作業
- 例: 「毎日: 分析をフェッチ → レポートを生成 → チームにメール」
共通のワークフローコンポーネント
すべてのパターンはこれらの構成要素を共有しています。
1. トリガー
- Webhook - HTTP エンドポイント (即時)
- Schedule - Cron ベースのタイミング (定期的)
- Manual - クリックして実行 (テスト)
- Polling - 変更をチェック (間隔)
2. データソース
- HTTP Request - REST API
- Database nodes - Postgres、MySQL、MongoDB
- Service nodes - Slack、Google Sheets など
- Code - カスタム JavaScript/Python
3. 変換
- Set - フィールドのマッピング/変換
- Code - 複雑なロジック
- IF/Switch - 条件付きルーティング
- Merge - データストリームの結合
4. 出力
- HTTP Request - API の呼び出し
- Database - データの書き込み
- Communication - メール、Slack、Discord
- Storage - ファイル、クラウドストレージ
5. エラー処理
- Error Trigger - ワークフローエラーのキャッチ
- IF - エラー条件のチェック
- Stop and Error - 明示的な失敗
- Continue On Fail - ノードごとの設定
ワークフロー作成チェックリスト
ANY ワークフローを構築する際は、このチェックリストに従ってください。
計画フェーズ
- [ ] パターン (Webhook、API、データベース、AI、スケジュール済み) を特定します。
- [ ] 必要なノードをリストアップします (search_nodes を使用)。
- [ ] データフロー (入力 → 変換 → 出力) を理解します。
- [ ] エラー処理戦略を計画します。
実装フェーズ
- [ ] 適切なトリガーでワークフローを作成します。
- [ ] データソースノードを追加します。
- [ ] 認証/資格情報を設定します。
- [ ] 変換ノード (Set、Code、IF) を追加します。
- [ ] 出力/アクションノードを追加します。
- [ ] エラー処理を設定します。
検証フェーズ
- [ ] 各ノード構成を検証します (validate_node)。
- [ ] 完全なワークフローを検証します (validate_workflow)。
- [ ] サンプルデータでテストします。
- [ ] エッジケース (空のデータ、エラー) を処理します。
デプロイフェーズ
- [ ] ワークフロー設定 (実行順序、タイムアウト、エラー処理) を確認します。
- [ ]
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]
使用時期: 個別のエラー処理ワークフローが必要な場合
よくある落とし穴
1. Webhook データ構造
問題: Webhook ペイロードデータにアクセスできない
解決策: データは $json.body の下にネストされています。
❌ {{$json.email}}
✅ {{$json.body.email}}
参照: n8n Expression Syntax スキル
2. 複数の入力アイテム
問題: ノードがすべての入力アイテムを処理してしまうが、1つだけ処理したい
解決策: 「Execute Once」モードを使用するか、最初のアイテムのみを処理します。
{{$json[0].field}} // 最初のアイテムのみ
3. 認証の問題
問題: API 呼び出しが 401/403 で失敗する
解決策:
- 資格情報を適切に設定します。
- パラメータではなく、「Credentials」セクションを使用します。
- ワークフローをアクティブ化する前に資格情報をテストします。
4. ノードの実行順序
問題: ノードが予期しない順序で実行される
解決策: ワークフロー設定 → Execution Order を確認します。
- v0: 上から下へ (レガシー)
- v1: 接続ベース (推奨)
5. 式のエラー
問題: 式がリテラルテキストとして表示される
解決策: 式を {{}} で囲みます。
- 詳細については、n8n Expression Syntax スキルを参照してください。
その他のスキルとの統合
これらのスキルは連携して動作します。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
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
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:
- Webhook - 35%
- Schedule (periodic tasks) - 28%
- Manual (testing/admin) - 22%
- Service triggers (Slack, email, etc.) - 15%
Most Common Transformations:
- Set (field mapping) - 68%
- Code (custom logic) - 42%
- IF (conditional routing) - 38%
- Switch (multi-condition) - 18%
Most Common Outputs:
- HTTP Request (APIs) - 45%
- Slack - 32%
- Database writes - 28%
- 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:
- webhook_processing.md - Webhook patterns, data structure, response handling
- http_api_integration - REST APIs, authentication, pagination, retries
- database_operations.md - Queries, sync, transactions, batch processing
- ai_agent_workflow.md - AI agents, tools, memory, langchain nodes
- scheduled_tasks.md - Cron schedules, reports, maintenance tasks
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:
- 5 core patterns cover 90%+ of workflow use cases
- Webhook processing is the most common pattern
- Use the workflow creation checklist for every workflow
- Plan pattern → Select nodes → Build → Validate → Deploy
- Integrate with other skills for complete workflow development
Next Steps:
- Identify your use case pattern
- Read the detailed pattern file
- Use n8n MCP Tools Expert to find nodes
- Follow the workflow creation checklist
- 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
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.