n8n-workflow-expert
Skill0 starsChanged 37 days agoMITView on GitHub
Expert skill for designing, building, and debugging n8n automation workflows. Use whenever the user mentions n8n, workflow automation, webhook design, API chaining, AI agent orchestration, triggers and nodes, Function nodes, HTTP Request nodes, error handling, retry logic, rate limiting, or self-hosted automation. Also trigger for "build an automation," "connect [tool A] to [tool B]," "process webhook data," "schedule a workflow," "AI agent in n8n," or "n8n vs Zapier/Make." Do NOT use for Zapier-specific or Make-specific questions - use those platform skills. Covers node architecture, expression language, error handling patterns, AI agent workflows, webhook security, data transformation, and common integration templates.
In this repository24 other files it gives its agents.
- agency-positioning-expertSkill
- case-study-writerSkill
- chief-marketing-officerSkill
- clay-enrichment-architectSkill
- cold-email-outreachSkill
- content-market-intelligenceSkill
- design-qaSkill
- email-marketingSkill
- ghl-snapshot-builderSkill
- go-high-level-expertSkill
- google-ads-expertSkill
- google-tag-manager-expertSkill
- icp-filter-architectSkill
- instagram-content-creatorSkill
- landing-page-designerSkill
- landing-page-visual-standardsSkill
- linkedin-outreach-architectSkill
- linkedin-post-writerSkill
- looker-studio-expertSkill
- meta-ads-expertSkill
- outreach-message-criticSkill
- seo-client-outreachSkill
- youtube-gap-finderSkill
- youtube-video-ideationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 17 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Schedule (Cron): Run at intervals
- Distinctive: line 21
Polling triggers: Check for changes in external services (Gmail, Sheets, etc.)
- Distinctive: line 48
Use the Set or Edit Fields node for simple transforms.
- Distinctive: line 49
Use the Code node (JavaScript) for complex logic.
- Distinctive: line 50
Use Function Item only if you need per-item custom logic.
- Very specific: line 55
Create a separate "Error Handler" workflow with Error Trigger node.
- Very specific: line 60
Add IF node checking $json.error and branch accordingly
- Distinctive: line 65
Use Wait node with exponential backoff
- Distinctive: line 70
When workflow processes webhooks that could arrive twice:
- Very specific: line 72
Check against cache (Redis/database/n8n static data)
- Distinctive: line 78
Authentication: Use header auth, query param tokens, or HMAC signatures
- Distinctive: line 79
HTTPS only: Never accept webhooks over HTTP in production
- Distinctive: line 80
Payload validation: Verify expected fields exist before processing
- Distinctive: line 108
Use the AI Agent node with tool nodes attached:
- Distinctive: line 160
Use SplitInBatches for rate-limited APIs
- Distinctive: line 172
Execution History: Check successful vs failed runs
- Distinctive: line 176
Webhook testing: Use webhook.site to inspect incoming payloads before routing to n8n
- Distinctive: line 179
Not handling empty arrays (zero items = workflow exits early without error)
- Distinctive: line 183
Not using static data for state persistence - instead hammering external APIs
- Distinctive: line 185
No error handling on critical paths
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
n8n Workflow Expert
When to Use This Skill
- Designing a new automation workflow
- Debugging a broken or misfiring workflow
- Building AI agents with Claude/GPT + tools
- Processing webhook data from external services
- Migrating from Zapier/Make to n8n
- Architecting scalable workflow patterns
Core Architecture
Trigger Types
- Webhook: Receive data from external services (most flexible)
- Schedule (Cron): Run at intervals
- Polling triggers: Check for changes in external services (Gmail, Sheets, etc.)
- Manual: For testing or on-demand runs
- Chat trigger: For conversational agents
Node Categories (What Actually Matters)
- Trigger nodes (start the workflow)
- Action nodes (API calls, integrations)
- Logic nodes (IF, Switch, Merge, Filter)
- Data nodes (Set, Edit Fields, Code)
- AI nodes (LLM calls, agents, vector stores)
The n8n Mental Model
Everything flows as arrays of items. Each node receives items, processes each one, passes output to next node. Understanding this solves 80% of beginner confusion.
Expression Language Essentials
Common Expression Patterns
{{ $json.fieldName }} // current node's field
{{ $node["Node Name"].json.field }} // previous node's field
{{ $input.all() }} // all input items
{{ $input.first().json.field }} // first item's field
{{ $now }} // current timestamp
{{ $json.fieldName?.toLowerCase() }} // safe chainingData Transformation
Use the Set or Edit Fields node for simple transforms. Use the Code node (JavaScript) for complex logic. Use Function Item only if you need per-item custom logic.
Error Handling Patterns
Pattern 1: Error Trigger Workflow
Create a separate "Error Handler" workflow with Error Trigger node. Assign it to critical workflows via workflow settings. Routes errors to Slack/email/logs.
Pattern 2: Continue on Fail
On nodes that may fail (flaky APIs):
- Enable "Continue On Fail" in node settings
- Add IF node checking
$json.errorand branch accordingly - Log failures to separate output
Pattern 3: Retry with Backoff
For rate-limited APIs:
- Use Wait node with exponential backoff
- Combine with Loop and counter variable
- Maximum retries to avoid infinite loops
Pattern 4: Idempotency Keys
When workflow processes webhooks that could arrive twice:
- Hash incoming payload
- Check against cache (Redis/database/n8n static data)
- Skip duplicate processing
Webhook Security
Must-Do Security Steps
- Authentication: Use header auth, query param tokens, or HMAC signatures
- HTTPS only: Never accept webhooks over HTTP in production
- Payload validation: Verify expected fields exist before processing
- Rate limiting: At reverse proxy level (Cloudflare, Nginx)
- Signature verification: For Stripe, GitHub, etc. - verify HMAC in Code node before proceeding
Signature Verification Example (Stripe)
const crypto = require('crypto');
const payload = JSON.stringify($input.first().json);
const signature = $input.first().headers['stripe-signature'];
const secret = 'whsec_...';
const computed = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
if (signature !== computed) {
throw new Error('Invalid signature');
}
return $input.all();AI Agent Workflows
Simple AI Chain (No Agent)
Webhook → Claude/OpenAI node → Set (format response) → Response node
AI Agent with Tools
Use the AI Agent node with tool nodes attached:
- Tool nodes are sub-workflows or HTTP Request nodes marked as tools
- Agent decides which tool to call based on input
- Each tool needs clear name + description for agent reasoning
Memory Types
- Window Buffer Memory: Last N messages, simple
- Summary Memory: Summarizes older messages
- Postgres/Redis Memory: Persistent across sessions, keyed by user ID
Claude API Pattern (HTTP Request Node)
POST https://api.anthropic.com/v1/messages
Headers:
x-api-key: {{ $credentials.anthropicApi.apiKey }}
anthropic-version: 2023-06-01
content-type: application/json
Body:
{
"model": "claude-sonnet-4-5",
"max_tokens": 1024,
"messages": [...]
}Vector Store Integration
For RAG agents:
- Ingestion workflow: Doc → Chunk → Embed → Pinecone/Qdrant/Supabase
- Retrieval workflow: Query → Embed → Vector search → Claude with context
Common Integration Templates
Gmail → Claude → CRM
Gmail trigger (new email) → Claude (classify + extract) → IF → HubSpot/GHL (create contact)
Google Sheets → LinkedIn Post
Schedule trigger → Sheets (get row) → Claude (write post) → LinkedIn (post) → Sheets (mark done)
Stripe Payment → Notion + Slack
Stripe webhook → Code (verify signature) → Notion (add record) → Slack (notify team)
Form Submission → Qualification → Routing
Typeform webhook → Claude (score lead) → Switch → [Hot: GHL + SMS] / [Warm: CRM] / [Cold: Email nurture]
Performance & Scaling
Execution Modes
- Queue mode: Workers process executions from queue (production recommended)
- Regular mode: Single process (development only)
Reducing Workflow Runtime
- Batch API calls where possible (e.g., get all rows at once, not one-by-one)
- Use SplitInBatches for rate-limited APIs
- Cache results with workflow static data or Redis
- Parallelize independent branches (let n8n execute in parallel)
Self-Hosting Notes
- Railway/Render: Easiest for solo users
- DigitalOcean/Hetzner: Cheaper at scale
- Docker Compose: Standard setup, use postgres + redis
- Backups: Automate database backups; workflow JSON is in database
Debugging Methodology
- Execution History: Check successful vs failed runs
- Pin data on nodes to test downstream without rerunning upstream
- Node-by-node run: Click play on individual nodes during build
- Console logs in Code nodes:
console.log()outputs to execution log - Webhook testing: Use webhook.site to inspect incoming payloads before routing to n8n
Common Mistakes
- Not handling empty arrays (zero items = workflow exits early without error)
- Forgetting to toggle "Always Output Data" when branches may return nothing
- Using Production webhook URL in test mode (or vice versa)
- Storing credentials in Code nodes instead of using Credentials system
- Not using static data for state persistence - instead hammering external APIs
- Building monolithic workflows - split into sub-workflows for maintainability
- No error handling on critical paths
Workflow Documentation Standards
For any workflow you ship:
- Sticky notes at top describing purpose, trigger, owner
- Node renaming: "Claude - Classify Email" not "HTTP Request1"
- Grouping related nodes visually
- Tag workflows by category (client, internal, experimental)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

