n8n-workflow
betaComprehensive guidance for designing and optimizing n8n 2.0+ (2026) workflows. Handles requirements analysis, node selection (Standard vs. AI Agent), and isolated Code node development. Use when the user says 'Help me create an n8n workflow', 'Build an automation for...', or 'Debug my n8n JavaScript code'. Do NOT use for general software engineering unrelated to n8n logic.
Quality Score Breakdown
Show checks (11)
- ✓ SKILL.md exists with exact casing 3/3
- ✓ Valid YAML frontmatter 3/3
- ✓ No unexpected frontmatter keys 1/1
- ✓ Name field valid (kebab-case) 2/2
- ✓ Name matches folder name 1/1
- ✓ Description field present 2/2
- ✓ No angle brackets in frontmatter 1/1
- ✓ Folder name is kebab-case 1/1
- ✓ No README.md inside skill folder 1/1
- ✓ Test directory with test-cases.yml exists 2/2
- ✓ Status 'beta' is valid 1/1
Show checks (7)
- ✓ Contains action verbs: handles 2/4
- ✓ Contains trigger indicators: use when, use for, says 5/5
- ✓ Description is specific and actionable 4/4
- ✓ N/A — skill doesn't handle specific file types 3/3
- ✓ Description length: 375/1024 chars 2/2
- ✓ Has negative triggers (scope boundaries) 2/2
- ✓ Owner/author specified in metadata 2/2
Show checks (8)
- ✓ Skill body has content 3/3
- ✓ Has step/section structure 4/4
- ✓ Includes examples 5/5
- ✓ Includes error handling 4/4
- ✗ Consider moving detailed docs to references/ for better token efficiency 0/4
- ✓ Actionable language: 3/10 verb patterns found 3/3
- ✓ Word count: 438/5000 2/2
- ✓ All referenced paths exist 3/3
Show checks (10)
- ✓ test-cases.yml exists and parses 3/3
- ✓ 3 should-trigger tests ✓ 4/4
- ✓ 3 should-not-trigger tests ✓ 3/3
- ✓ 2 functional tests ✓ 5/5
- ✓ 1 negative tests ✓ 3/3
- ✓ 1 edge case tests ✓ 3/3
- ✓ Performance baseline documented 2/2
- ✓ All functional tests have ≥2 assertions 2/2
- ✓ All trigger phrases are diverse 2/2
- ✓ All assertions are specific 2/2
Show checks (5)
- ✓ No secrets detected 5/5
- ✓ No injection vectors in frontmatter 3/3
- ✓ Name is not reserved 3/3
- ✓ No suspicious code patterns 2/2
- ✓ External URLs: 0 2/2
Suggestions
- → Move detailed reference material to references/ and link from SKILL.md
- → Add more functional tests — aim for 4-5 covering common scenarios and edge cases
Test Coverage
n8n Workflow Creation Skill
Expert assistant for building reliable, production-grade n8n 2.0 workflows utilizing AI Agent nodes, MCP integrations, and isolated Task Runners.
Instructions
Step 1: Gather Context
Before designing, you must identify the following core requirements:
Workflow Type: Determine if this is a deterministic Standard workflow or an autonomous Agentic workflow.
Trigger Source: Identify if the workflow is triggered by a Webhook, Schedule, or App Event.
- Deployment Status: Confirm if the user is working on a Draft (Save) or a Live (Publish) instance, following the n8n 2026 paradigm.
- Data Structure: Ask for sample JSON input/output to ensure correct data mapping between nodes.
Step 2: Process
Design the workflow using the standard modular pattern:
Node Selection: Choose Standard nodes for fixed logic and AI Agent nodes for tasks requiring natural language reasoning or multi-tool selection via MCP.
-
Data Mapping: Use 2026 expression syntax
{{ $json.field }}. Remind the user that Sub-workflows now automatically return processed data to the parent. -
Code Implementation: If a Code node is required, wrap logic in the isolated Task Runner format:
const items = $input.all(); return items.map(i => ({ json: { ... } }));. Avoidprocess.envcalls as they are blocked by default.
Error Handling: Implement node-level “Continue on Fail” or global Error Workflows for production stability.
Step 3: Output
Provide the following for every request:
- Workflow Diagram: A text-based or Mermaid representation of the node connections.
- Node Configuration: Specific settings for critical nodes (e.g., Webhook paths, HTTP methods, or Agent prompts).
- Code Snippets: Fully formatted JavaScript or Python code for any Code nodes.
- Deployment Note: Instructions on whether to Save for testing or Publish for production.
Examples
Example 1: Basic AI Agent Integration
Scenario: User wants an AI to process incoming support emails. Actions:
- Trigger: Email Read (IMAP) node.
- Orchestrator: AI Agent node with a “Support Specialist” prompt.
- Tools: MCP nodes for “Search Documentation” and “Draft Gmail Reply”.
Result: Automated context-aware email drafting.
Error Handling
Common Issues
Permission Denied in Code Node
- Cause: Attempting to access file systems or environment variables blocked by the 2026 isolated Task Runner.
Solution: Pass required values through node parameters or use specialized binary file nodes.
Webhook Not Responding
- Cause: Workflow is in “Saved” status but not “Published”.
Solution: Publish the workflow to enable the production webhook URL.
Data Mapping Failure in Sub-workflow
- Cause: Parent workflow not waiting for the new automatic data return payload.
Solution: Ensure “Wait for Completion” is enabled in the Execute Workflow node.