n8n
Open-source workflow automation platform with visual node-based editor, 400+ integrations, webhooks, and self-hosted deployment capabilities
What this skill does
# n8n Workflow Automation Skill
Master n8n for visual workflow automation, API integrations, and self-hosted automation pipelines. This skill covers workflow design, node configuration, triggers, credentials management, custom nodes, and production deployment patterns.
## When to Use This Skill
### USE when:
- Building integrations between 400+ services (Slack, Gmail, Notion, Airtable, etc.)
- Creating visual workflows accessible to non-developers
- Self-hosting is required for data sovereignty and compliance
- Need webhook-triggered automations with real-time processing
- Building internal tool automations and business process automation
- Connecting APIs without writing extensive code
- Rapid prototyping of automation workflows
- Need human-in-the-loop approval workflows
### DON'T USE when:
- Orchestrating complex data pipelines with dependencies (use Airflow)
- CI/CD pipelines tightly coupled with git (use GitHub Actions)
- Need sub-second latency requirements (use direct API calls)
- Processing massive datasets (use dedicated ETL tools)
- Require enterprise audit compliance out-of-box (evaluate requirements)
- Simple single-trigger cron jobs (use systemd timers)
## Prerequisites
### Installation Options
**Option 1: npm (Development)**
```bash
# Install globally
npm install n8n -g
# Start n8n
n8n start
# Access UI at http://localhost:5678
```
**Option 2: Docker (Recommended)**
```bash
# Quick start with Docker
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v ~/.n8n:/home/node/.n8n \
n8nio/n8n
# Access UI at http://localhost:5678
```
**Option 3: Docker Compose (Production)**
```yaml
# docker-compose.yml
version: '3.8'
services:
n8n:
image: n8nio/n8n:latest
restart: always
ports:
- "5678:5678"
environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=${N8N_PASSWORD}
- N8N_HOST=n8n.example.com
- N8N_PORT=5678
- N8N_PROTOCOL=https
- WEBHOOK_URL=https://n8n.example.com/
- GENERIC_TIMEZONE=UTC
- TZ=UTC
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=n8n
- DB_POSTGRESDB_USER=n8n
- DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}
- N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}
volumes:
- n8n_data:/home/node/.n8n
- ./custom-nodes:/home/node/.n8n/custom
depends_on:
- postgres
postgres:
image: postgres:15
restart: always
environment:
- POSTGRES_USER=n8n
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=n8n
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U n8n"]
interval: 10s
timeout: 5s
retries: 5
volumes:
n8n_data:
postgres_data:
```
```bash
# Start with docker-compose
docker compose up -d
# View logs
docker compose logs -f n8n
```
**Option 4: Kubernetes with Helm**
```bash
# Add n8n Helm repo
helm repo add n8n https://n8n-io.github.io/n8n-helm
helm repo update
# Install n8n
helm install n8n n8n/n8n \
--namespace n8n \
--create-namespace \
--set ingress.enabled=true \
--set ingress.hosts[0].host=n8n.example.com
# Get initial admin password
kubectl get secret -n n8n n8n -o jsonpath="{.data.password}" | base64 --decode
```
### Development Setup
```bash
# Clone for custom node development
git clone https://github.com/n8n-io/n8n.git
cd n8n
# Install dependencies
pnpm install
# Build
pnpm build
# Start development server
pnpm dev
```
## Core Capabilities
### 1. Basic Workflow Structure
```json
{
"name": "Basic Data Pipeline",
"nodes": [
{
"parameters": {},
"id": "start-node",
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [240, 300]
},
{
"parameters": {
"url": "https://api.example.com/data",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "httpHeaderAuth",
"options": {
"response": {
"response": {
"responseFormat": "json"
}
}
}
},
"id": "http-request",
"name": "Fetch Data",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [460, 300],
"credentials": {
"httpHeaderAuth": {
"id": "1",
"name": "API Key"
}
}
},
{
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "// Transform each item\nconst item = $input.item.json;\n\nreturn {\n id: item.id,\n name: item.name.toUpperCase(),\n processed_at: new Date().toISOString(),\n source: 'n8n-pipeline'\n};"
},
"id": "transform",
"name": "Transform Data",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [680, 300]
},
{
"parameters": {
"resource": "row",
"operation": "create",
"tableId": "={{ $env.AIRTABLE_TABLE_ID }}",
"options": {}
},
"id": "airtable",
"name": "Save to Airtable",
"type": "n8n-nodes-base.airtable",
"typeVersion": 2,
"position": [900, 300],
"credentials": {
"airtableTokenApi": {
"id": "2",
"name": "Airtable Token"
}
}
}
],
"connections": {
"Start": {
"main": [
[{ "node": "Fetch Data", "type": "main", "index": 0 }]
]
},
"Fetch Data": {
"main": [
[{ "node": "Transform Data", "type": "main", "index": 0 }]
]
},
"Transform Data": {
"main": [
[{ "node": "Save to Airtable", "type": "main", "index": 0 }]
]
}
},
"settings": {
"executionOrder": "v1"
}
}
```
### 2. Webhook Triggers
```json
{
"name": "Webhook Handler",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "incoming-webhook",
"responseMode": "responseNode",
"options": {
"rawBody": true
}
},
"id": "webhook",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1.1,
"position": [240, 300],
"webhookId": "unique-webhook-id"
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json.event_type }}",
"operation": "equals",
"value2": "payment.completed"
}
]
}
},
"id": "filter",
"name": "Filter Payment Events",
"type": "n8n-nodes-base.filter",
"typeVersion": 2,
"position": [460, 300]
},
{
"parameters": {
"jsCode": "// Validate webhook signature\nconst crypto = require('crypto');\n\nconst payload = $input.item.json;\nconst signature = $input.item.headers['x-signature'];\nconst secret = $env.WEBHOOK_SECRET;\n\nconst expectedSignature = crypto\n .createHmac('sha256', secret)\n .update(JSON.stringify(payload))\n .digest('hex');\n\nif (signature !== expectedSignature) {\n throw new Error('Invalid webhook signature');\n}\n\nreturn {\n ...payload,\n validated: true,\n processed_at: new Date().toISOString()\n};"
},
"id": "validate",
"name": "Validate Signature",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [680, 300]
},
{
"parameters": {
"channel": "#payments",
"text": "=Payment received!\n\nAmount: ${{ $json.amount }}\nCustomer: {{ $json.customer_email }}\nTransaction ID: {{ $json.transaction_id }}",
"otherOptions": {}
},
"id": "slack",
"name": "Notify Slack",
"type": "n8n-nodes-base.slack",
"typeVersion": 2.1,
"position": [900, 300],
"credentials": {
"slackApi": {
"id": "3",
"name": "Slack Bot"
}
}
},
{
"parameters": {
"respondWith": "json",
Related in automation
prompt-engineer
IncludedTransforms user prompts into optimized prompts using frameworks (RTF, RISEN, Chain of Thought, RODES, Chain of Density, RACE, RISE, STAR, SOAP, CLEAR, GROW)
windmill
IncludedDeveloper-first workflow engine that turns scripts into workflows and UIs, supporting Python, TypeScript, Go, and Bash with approval flows, schedule management, and self-hosted deployment
prompt-engineer
IncludedTransforms user prompts into optimized prompts using frameworks (RTF, RISEN, Chain of Thought, RODES, Chain of Density, RACE, RISE, STAR, SOAP, CLEAR, GROW)
activepieces
IncludedSelf-hosted no-code automation platform with visual flow builder, type-safe custom pieces, API integrations, and event-driven triggers
airflow
IncludedPython DAG workflow orchestration using Apache Airflow for data pipelines, ETL processes, and scheduled task automation
github-actions
IncludedCI/CD automation and workflow orchestration using GitHub Actions for builds, tests, deployments, and repository automation