n8n-workflow-patterns

Provides architectural patterns for building n8n workflows across webhooks, APIs, databases, AI agents, and schedules.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/guestyorg/n8n-workflow-builder --skill n8n-workflow-patterns-guestyorg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n8n-workflow-patterns
Source: https://github.com/guestyorg/n8n-workflow-builder/tree/main/n8n-skills/skills/n8n-workflow-patterns
Command: npx skills add https://github.com/guestyorg/n8n-workflow-builder --skill n8n-workflow-patterns-guestyorg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building n8n workflows from scratch often leads to structural mistakes, missed error handling, and common gotchas like misreading webhook payloads. This Skill provides five proven architectural patterns so workflows follow tested structures instead of ad-hoc designs. ## Core Features & Use Cases - Five Core Patterns: Webhook Processing, HTTP API Integration, Database Operations, AI Agent Workflows, and Scheduled Tasks, each with structure, configuration examples, and checklists. - Pattern Selection Guide: Decision criteria for choosing the right pattern based on triggers, data flow, and use case. - Gotchas & Best Practices: Documents frequent mistakes such as accessing webhook data under $json.body, SQL injection prevention with parameterized queries, and ai_tool port connections. - Use Case: When asked to build a workflow that receives Stripe payment webhooks, updates a Postgres database, and sends Slack confirmations, the Skill supplies the webhook pattern structure, signature verification approach, and error handling checklist. ## Quick Start Ask the AI to design an n8n workflow for your use case, such as a daily scheduled report that fetches analytics and emails the team, and it will apply the matching pattern.

Frequently Asked Questions about n8n-workflow-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure an n8n webhook workflow?

Use the pattern Webhook → Validate → Transform → Action → Response. Remember that incoming payload data is nested under $json.body, not $json directly, and choose a response mode: onReceived for immediate 200 responses or lastNode for custom responses.

How do I build an AI agent workflow in n8n?

Connect a language model to the AI Agent node via the ai_languageModel port, attach any node as a tool via the ai_tool port, and add Window Buffer Memory via ai_memory for conversation context. Write specific tool descriptions since the AI uses them to decide when to call each tool.

What is the best pattern for n8n database synchronization?

Use Schedule → Query → Transform → Write → Verify with incremental sync queries filtering on updated_at timestamps. Always use parameterized queries to prevent SQL injection, batch large datasets with Split In Batches, and use transactions for multi-step writes.

Why is my n8n webhook data empty or undefined?

Webhook payload data is nested under $json.body, so {{$json.email}} returns nothing while {{$json.body.email}} works. Headers are under $json.headers, URL parameters under $json.params, and query strings under $json.query.

How do I handle pagination in n8n HTTP API requests?

Use a loop pattern with offset-based, cursor-based, or Link-header pagination depending on the API. Initialize a page or cursor variable, check the response for a next indicator, increment, and loop back until no more pages exist.

How do I prevent overlapping n8n scheduled workflow executions?

Add an execution lock using Redis: check for a lock key at workflow start, skip execution if it exists, otherwise set the lock with a TTL, run the workflow, and delete the lock on completion. Also set the workflow timezone explicitly to handle DST correctly.