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. Always consult this skill when the user asks to create, build, or design an n8n workflow, automate a process, or connect services — even if they don't explicitly mention 'patterns'. Covers webhook, API, database, AI, batch processing, and scheduled automation architectures.
czlonkowski4,451 스타2026. 4. 13.
직업
카테고리
아키텍처 패턴
스킬 내용
Proven architectural patterns for building n8n workflows.
After the loop, $('Node Inside Loop').all() returns ONLY the last batch's items. To accumulate across all iterations, use $getWorkflowStaticData('global') in a Code node inside the loop. See the n8n Code JavaScript skill for the full pattern.
Nested Loops
When processing N categories × M items per category (where an API has a batch limit):
Define Categories (N items)
→ Outer Loop (SplitInBatches, batchSize=1)
→ Prepare category data
→ Inner Loop (SplitInBatches, batchSize=1000)
→ API Call → Verify → (loops back to Inner Loop via main[1])
→ Inner done[0] → Rate Limit Delay → back to Outer Loop
→ Outer done[0] → Limit 1 → Final Aggregate
Wiring gotcha: The inner done[0] must connect back to the OUTER loop input, not to the aggregate. The outer done[0] feeds the final aggregate.
API Pagination
For APIs without multi-ID filtering, use id_from + date windowing for efficient pagination:
Schedule → Set Date Window → Fetch Page → Process
→ IF has more? → [true] Update id_from → Fetch Page (loop)
→ [false] → Aggregate → Output
Dry-Run / Verification Tolerance
When testing with API write nodes disabled (for dry runs), downstream verification nodes receive the request body instead of the response. Make verification tolerant:
// In verification Code node
const body = $input.first().json;
const looksLikeRequest = body.method && body.parameters && !body.status;
if (looksLikeRequest) {
return [{ json: { status: 'SKIPPED', message: 'Upstream disabled for testing' }}];
}
// Normal response verification below...
Integration-Specific Gotchas
Google Sheets
NEVER use append on sheets with formula columns — it breaks formulas. Use Google Sheets API values.update (PUT) via HTTP Request node with a googleApi credential
Write numbers, not strings for formula-dependent columns — string "4.98" breaks ADD() formulas. Use parseFloat() in a Code node
Per-item execution trap: Google Sheets nodes execute once per input item. If you need a single bulk write, aggregate items into one in a Code node first
UNFORMATTED_VALUE returns numbers, not text like "N/A" — filter explicitly in Code nodes
Google Drive
convertToGoogleDocument: true creates a Google Doc (text), NOT a Google Sheet — to upload a CSV for download, omit this option entirely
CSV download link format: https://drive.google.com/uc?id={fileId}&export=download — use instead of /view links
Bidirectional Threshold Checking
When comparing values (prices, quantities, metrics), always check both directions:
// ❌ Only catches increases
if (diff > threshold) { flag(); }
// ✅ Catches both spikes AND crashes — both are data-quality signals
if (Math.abs(diff) > threshold) { flag(); }
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
Manage data tables with n8n_manage_datatable
n8n Expression Syntax - Use to:
Write expressions in transformation nodes
Access webhook data correctly ({{$json.body.field}})
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)