n8n-workflow

Create, modify, and understand n8n automation workflows. Use when building n8n workflow JSON files, configuring nodes (HTTP Request, Code, IF, Merge, Webhook, Schedule), writing expressions with {{ $json }}, or implementing flow logic (conditionals, loops, error handling). Triggers for requests involving n8n, workflow automation, or node-based pipeline creation.

16 stars

Best use case

n8n-workflow is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Create, modify, and understand n8n automation workflows. Use when building n8n workflow JSON files, configuring nodes (HTTP Request, Code, IF, Merge, Webhook, Schedule), writing expressions with {{ $json }}, or implementing flow logic (conditionals, loops, error handling). Triggers for requests involving n8n, workflow automation, or node-based pipeline creation.

Teams using n8n-workflow should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/n8n-workflow/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/n8n-workflow/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/n8n-workflow/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How n8n-workflow Compares

Feature / Agentn8n-workflowStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Create, modify, and understand n8n automation workflows. Use when building n8n workflow JSON files, configuring nodes (HTTP Request, Code, IF, Merge, Webhook, Schedule), writing expressions with {{ $json }}, or implementing flow logic (conditionals, loops, error handling). Triggers for requests involving n8n, workflow automation, or node-based pipeline creation.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# n8n Workflow Creator

This skill provides guidance for creating valid n8n workflow JSON files.

## 🚨 Critical: Webhook Data Structure

**Most common mistake**: Webhook data is nested under `.body`, NOT at root!

```javascript
// ❌ WRONG - Returns undefined
{{ $json.email }}

// ✅ CORRECT - Webhook data is under .body
{{ $json.body.email }}
```

This applies to expressions AND Code nodes.

## Workflow Structure

```json
{
  "name": "Workflow Name",
  "nodes": [...],
  "connections": {...},
  "active": false,
  "settings": { "executionOrder": "v1" }
}
```

## The 5 Core Patterns

1. **Webhook Processing** - Webhook → Validate → Transform → Respond
2. **HTTP API Integration** - Trigger → HTTP Request → Transform → Action
3. **Database Operations** - Schedule → Query → Transform → Write → Verify
4. **AI Agent Workflow** - Trigger → AI Agent (Model + Tools) → Output
5. **Scheduled Tasks** - Schedule → Fetch → Process → Deliver → Log

See [patterns.md](references/patterns.md) for complete examples.

## Essential Nodes

| Node | Type | Use Case |
|------|------|----------|
| Manual Trigger | `n8n-nodes-base.manualTrigger` | Test execution |
| Schedule | `n8n-nodes-base.scheduleTrigger` | Cron-based runs |
| Webhook | `n8n-nodes-base.webhook` | HTTP endpoints |
| HTTP Request | `n8n-nodes-base.httpRequest` | API calls |
| Code | `n8n-nodes-base.code` | JavaScript/Python |
| Set | `n8n-nodes-base.set` | Modify/create fields |
| IF | `n8n-nodes-base.if` | Conditional branching |
| Merge | `n8n-nodes-base.merge` | Combine branches |
| Loop Over Items | `n8n-nodes-base.splitInBatches` | Batch processing |

See [nodes.md](references/nodes.md) for full configurations.

## Expression Syntax

Expressions use `{{ }}` syntax:

```javascript
{{ $json.fieldName }}              // Current item
{{ $json.body.email }}             // Webhook data (under .body!)
{{ $('NodeName').item.json.field }} // Other node's output
{{ $now }}                         // Current timestamp
```

**❌ Don't use `{{ }}` in:**
- Code nodes (use JavaScript directly)
- Webhook paths
- Credential fields

See [expressions.md](references/expressions.md) for advanced patterns.

## Code Node - Critical Rules

**ALWAYS return array with `json` property:**

```javascript
// ✅ CORRECT
const items = $input.all();
return items.map(item => ({ json: { ...item.json, processed: true } }));

// ✅ CORRECT - Single item
return [{ json: { result: 'success' } }];

// ❌ WRONG - No return
const data = $input.first();
// forgot return!

// ❌ WRONG - Object instead of array
return { json: { result: 'success' } };
```

**Best practices:**
- Validate input: `if (!items || items.length === 0) return [];`
- Use null checks: `item.json?.user?.email || 'default'`
- Try-catch for API calls
- Filter early, process late

## Common Gotchas

| Problem | Solution |
|---------|----------|
| Can't access webhook data | Use `$json.body.field`, not `$json.field` |
| Expression shows as text | Wrap in `{{ }}` |
| Unexpected node order | Check Settings → Execution Order (use v1) |
| Code node returns nothing | Add `return` statement |
| API returns 401/403 | Use Credentials section, not parameters |

## Connections Format

```json
"connections": {
  "Source Node": {
    "main": [[{ "node": "Target Node", "type": "main", "index": 0 }]]
  }
}
```

**IF node outputs:** `index: 0` = True, `index: 1` = False

## Best Practices

**✅ Do:**
- Use descriptive node names ("Fetch Users", not "HTTP Request 1")
- Set `onError: "continueRegularOutput"` for resilience
- Test incrementally, node by node
- Document complex workflows with notes
- Handle empty data cases

**❌ Don't:**
- Build workflows in one shot (iterate!)
- Skip error handling
- Hardcode credentials in parameters
- Use Code node when built-in nodes suffice
- Deploy without testing

## Reference Documentation

- [nodes.md](references/nodes.md) - Node configurations
- [expressions.md](references/expressions.md) - Expression syntax
- [patterns.md](references/patterns.md) - Workflow patterns
- [json-structure.md](references/json-structure.md) - JSON schema

Related Skills

n8n-workflow-patterns

16
from diegosouzapw/awesome-omni-skill

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, or scheduled tasks.

n8n-workflow-automation

16
from diegosouzapw/awesome-omni-skill

Build no-code/low-code automation workflows for construction using n8n. Automate data extraction, cost estimation, report generation, and system integrations without writing code.

n8n-workflow-architect

16
from diegosouzapw/awesome-omni-skill

Strategic automation architecture advisor. Use when users want to plan automation solutions, evaluate their tech stack (Shopify, Zoho, HubSpot, etc.), decide between n8n vs Python/Claude Code, or need guidance on production-ready automation design. Invokes plan mode for complex architectural decisions.

moai-workflow-testing

16
from diegosouzapw/awesome-omni-skill

Comprehensive development workflow specialist combining TDD, debugging, performance optimization, code review, PR review, and quality assurance into unified development workflows

moai-workflow-templates

16
from diegosouzapw/awesome-omni-skill

Enterprise template management with code boilerplates, feedback templates, and project optimization workflows

jikime-workflow-templates

16
from diegosouzapw/awesome-omni-skill

Enterprise template management with code boilerplates, feedback templates, and project optimization workflows

jikime-workflow-learning

16
from diegosouzapw/awesome-omni-skill

Continuous learning system - extract, store, and reuse patterns from Claude Code sessions

hytaleservers-workflow

16
from diegosouzapw/awesome-omni-skill

Standard workflow for HyTaleServers.tech development

fastapi-workflow

16
from diegosouzapw/awesome-omni-skill

Docs-first development workflow for Python + FastAPI + Pydantic v2 projects with async APIs, dependency injection, and SQLAlchemy. Fetches current documentation via MCP before any implementation. Use when building or modifying FastAPI backends, API endpoints, Pydantic models, or database operations. Trigger phrases - "fastapi", "python api", "backend api", "pydantic", "sqlalchemy", "async api", "dependency injection". NOT for frontend work (use frontend-app/frontend-lp) or non-Python backends.

extending-workflows

16
from diegosouzapw/awesome-omni-skill

Create and extend workflow definitions using the workflow system architecture

dev-workflow-planning

16
from diegosouzapw/awesome-omni-skill

Structured development workflows using /brainstorm, /write-plan, and /execute-plan patterns. Transform ad-hoc conversations into systematic project execution with hypothesis-driven planning, incremental implementation, and progress tracking.

debugging-workflow

16
from diegosouzapw/awesome-omni-skill

Systematic debugging workflow with parallel agent exploration, root cause analysis, and fix verification. Adapted from feature-dev methodology for bug investigation.