n8n-workflow-patterns

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

2|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/mdc159/cbass --skill n8n-workflow-patterns-mdc159
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n8n-workflow-patterns
Source: https://github.com/mdc159/cbass/tree/main/.claude/skills/n8n-workflow-patterns-v1.0.0
Command: npx skills add https://github.com/mdc159/cbass --skill n8n-workflow-patterns-mdc159

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 workflow architecture patterns so you start from a correct, tested structure instead of trial and error. ## Core Features & Use Cases - Five Core Patterns: Webhook processing, HTTP API integration, database operations, AI agent workflows, and scheduled tasks, each with structure diagrams and configuration examples. - Pattern Selection Guide: Decision criteria mapping use cases (form submissions, ETL sync, chatbots, reports) to the right pattern. - Gotchas & Best Practices: Documents critical mistakes such as accessing webhook data under $json.body, SQL injection prevention with parameterized queries, and connecting tools via the ai_tool port. - Use Case: You need to build a Slack notification workflow triggered by a payment webhook. Follow the webhook processing pattern to validate the payload, transform fields, and respond correctly. ## Quick Start Ask the AI to design an n8n workflow for your use case, such as a scheduled daily report or a webhook-driven Slack notification, using the appropriate workflow 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 between onReceived and lastNode response modes based on whether the caller needs a custom response.

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 through the ai_tool port, and add Window Buffer Memory via ai_memory for conversation context. Write specific tool descriptions so the agent knows when to call each tool.

How do I handle pagination when calling REST APIs in n8n?

Loop with an offset, cursor, or Link-header strategy: fetch a page, extract the next cursor or increment the page counter in a Set or Code node, and loop back until no more pages remain. Add Wait nodes between requests to respect rate limits.

Why is my n8n webhook data empty or undefined?

Webhook payload fields live under $json.body, so {{$json.email}} returns nothing while {{$json.body.email}} works. Also verify the request Content-Type header is application/json so n8n parses the body correctly.

How do I prevent SQL injection in n8n database nodes?

Always use parameterized queries with placeholders like $1 and pass values through the parameters array instead of concatenating expressions into the query string. Additionally, connect with a least-privilege database user that has only the permissions the workflow needs.

How do I stop overlapping executions of a scheduled n8n workflow?

Use an execution lock: at workflow start, check a Redis key, skip execution if the lock exists, otherwise set the lock with a TTL, run the workflow, and delete the lock at the end. This prevents long-running tasks from overlapping with the next scheduled run.