domains / devops / n8n-workflow-design / n8n-workflow-patterns

n8n-workflow-patterns

Skill card

combined

The sickn33 copy is a bulk mirror that reproduces the core structure of the czlonkowski skill but omits its 6th pattern (Batch Processing) and its detailed 'Workflow lifecycle' validation gates. Conversely, the sickn33 copy includes 'Data Flow Patterns' (Linear, Branching, Parallel, Loop) and a 'Common Gotchas' section (Webhook data structure, execution order, etc.) that are absent from the czlonkowski text. Because each copy contains material steps and constraints the other lacks, crowning one would hide a real alternative.

Repositories

RepositoryPath
czlonkowski/n8n-skillsskills/n8n-workflow-patterns/SKILL.md
sickn33/agentic-awesome-skillsplugins/agentic-awesome-skills-claude/skills/n8n-workflow-patterns/SKILL.md

Other copies

RoleRepositoryPath
peerczlonkowski/n8n-skillsskills/n8n-workflow-patterns/SKILL.md
peersickn33/agentic-awesome-skillsplugins/agentic-awesome-skills-claude/skills/n8n-workflow-patterns/SKILL.md
adaptersickn33/agentic-awesome-skillsplugins/agentic-awesome-skills/skills/n8n-workflow-patterns/SKILL.md
adaptersickn33/agentic-awesome-skillsplugins/agentic-bundle-aas-automation-builder/skills/n8n-workflow-patterns/SKILL.md
adaptersickn33/agentic-awesome-skillsskills/n8n-workflow-patterns/SKILL.md

Combined skill

---
name: n8n-workflow-patterns
description: 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, batch processing, or scheduled tasks.
---

# n8n Workflow Patterns

Proven architectural patterns for building n8n workflows.

## The 6 Core Patterns

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

6. **Batch Processing**
   - Process large datasets in chunks with API rate limits
   - Pattern: Prepare → SplitInBatches → Process per batch → Accumulate → Aggregate

## Pattern Selection Guide

**Webhook Processing** - Use when receiving data from external systems, building integrations, or needing instant response.
**HTTP API Integration** - Use when fetching data from external APIs, synchronizing services, or building data pipelines.
**Database Operations** - Use when syncing databases, running scheduled queries, or ETL.
**AI Agent Workflow** - Use when building conversational AI or multi-step reasoning with tools.
**Scheduled Tasks** - Use for recurring reports, periodic fetching, or maintenance.
**Batch Processing** - Use when processing large datasets exceeding API limits or nested loops.

## Common Workflow Components

1. **Triggers**: Webhook, Schedule, Manual, Polling.
2. **Data Sources**: HTTP Request, Database nodes, Service nodes, Code.
3. **Transformation**: Set, Code, IF/Switch, Merge. (Tip: Use `{{ $jmespath($json, "…") }}` for nested slices to replace Split/Filter/Aggregate chains.)
4. **Outputs**: HTTP Request, Database, Communication, Storage.
5. **Error Handling**: Error Trigger, IF, Stop and Error, Continue On Fail.

## Data Flow Patterns

- **Linear**: Trigger → Transform → Action → End
- **Branching**: Trigger → IF → [True/False Paths]
- **Parallel**: Trigger → [Branch 1/2] → Merge
- **Loop**: Trigger → Split in Batches → Process → Loop
- **Error Handler**: Main Flow → [Success] / [Error Trigger → Handler]

## Workflow Creation Checklist

### Planning Phase
- [ ] Identify the pattern
- [ ] List required nodes
- [ ] Understand data flow
- [ ] Plan error handling strategy

### Implementation Phase
- [ ] Create workflow with appropriate trigger
- [ ] Add data source nodes
- [ ] Configure authentication/credentials
- [ ] Add transformation nodes
- [ ] Add output/action nodes
- [ ] Configure error handling

### Validation Phase
- [ ] Validate each node configuration
- [ ] Validate complete workflow
- [ ] Test with sample data
- [ ] Handle edge cases

### Deployment Phase
- [ ] Review workflow settings
- [ ] Activate workflow
- [ ] Monitor first executions
- [ ] Document workflow purpose

## Workflow Lifecycle: Validate, Verify, Test Before Activating

Validation passing is necessary, not sufficient. A workflow can validate clean and still drop items or pick the wrong Merge input.

1. **Validate**: Run `validate_workflow` on the full JSON.
2. **Verify**: Check logic and data shapes.
3. **Test**: Run with sample data.
4. **Activate**: Only after passing all gates.

## Common Gotchas

1. **Webhook Data Structure**: Data is nested under `$json.body` (e.g., `{{$json.body.email}}`).
2. **Multiple Input Items**: Use "Execute Once" mode or `{{$json[0].field}}` to process only the first item.
3. **Authentication Issues**: Configure credentials in the "Credentials" section, not parameters. Test before activation.
4. **Node Execution Order**: Check workflow settings. v1 (Connection-based) is recommended over v0 (Top-to-bottom).
5. **Expression Errors**: Check syntax and variable scope.