Loading...
Loading...
n8n workflow automation patterns and API integration. This skill should be used when creating n8n workflows, using webhooks, managing workflows via REST API, or integrating n8n with MCP servers. Covers workflow JSON structure, node patterns, and automation best practices.
npx skill4agent add 89jobrien/steve n8nN8N_HOST=localhost
N8N_PORT=5678
N8N_API_KEY=your-api-key{
"name": "Workflow Name",
"nodes": [],
"connections": {},
"settings": {
"executionOrder": "v1"
}
}{
"id": "unique-id",
"name": "Display Name",
"type": "n8n-nodes-base.nodetype",
"typeVersion": 1,
"position": [x, y],
"parameters": {},
"credentials": {}
}{
"Source Node": {
"main": [
[{"node": "Target Node", "type": "main", "index": 0}]
]
}
}{
"name": "Webhook Handler",
"nodes": [
{
"id": "webhook",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [250, 300],
"webhookId": "my-webhook",
"parameters": {
"path": "my-endpoint",
"httpMethod": "POST",
"responseMode": "responseNode"
}
},
{
"id": "respond",
"name": "Respond",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [450, 300],
"parameters": {
"respondWith": "json",
"responseBody": "={{ $json }}"
}
}
],
"connections": {
"Webhook": {
"main": [[{"node": "Respond", "type": "main", "index": 0}]]
}
}
}http://localhost:5678/webhook/my-endpoint{
"id": "http",
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [450, 300],
"parameters": {
"method": "POST",
"url": "https://api.example.com/endpoint",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "myApiCredential",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={{ JSON.stringify($json) }}"
},
"credentials": {
"myApiCredential": {"id": "cred-id", "name": "My Credential"}
}
}{
"id": "if",
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [450, 300],
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"leftValue": "={{ $json.status }}",
"rightValue": "success",
"operator": {
"type": "string",
"operation": "equals"
}
}
],
"combinator": "and"
}
}
}{
"id": "batch",
"name": "Loop Over Items",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [450, 300],
"parameters": {
"batchSize": 10,
"options": {}
}
}curl -s "http://localhost:5678/api/v1/workflows" \
-H "X-N8N-API-KEY: $N8N_API_KEY"curl -s "http://localhost:5678/api/v1/workflows/{id}" \
-H "X-N8N-API-KEY: $N8N_API_KEY"curl -s -X POST "http://localhost:5678/api/v1/workflows" \
-H "X-N8N-API-KEY: $N8N_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "New Workflow", "nodes": [...], "connections": {...}}'curl -s -X PUT "http://localhost:5678/api/v1/workflows/{id}" \
-H "X-N8N-API-KEY: $N8N_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Updated", "nodes": [...], "connections": {...}}'curl -s -X POST "http://localhost:5678/api/v1/workflows/{id}/activate" \
-H "X-N8N-API-KEY: $N8N_API_KEY"
curl -s -X POST "http://localhost:5678/api/v1/workflows/{id}/deactivate" \
-H "X-N8N-API-KEY: $N8N_API_KEY"curl -s "http://localhost:5678/api/v1/executions?workflowId={id}&limit=10&includeData=true" \
-H "X-N8N-API-KEY: $N8N_API_KEY"| Syntax | Description |
|---|---|
| Access current item field |
| Access nested field |
| Access output from specific node |
| First input item |
| All input items |
| Convert to JSON string |
| Node | Type | Purpose |
|---|---|---|
| Webhook | | HTTP trigger |
| HTTP Request | | API calls |
| Respond to Webhook | | Return HTTP response |
| IF | | Conditional branching |
| Switch | | Multi-way branching |
| Set | | Transform data |
| Code | | Custom JavaScript |
| Split In Batches | | Loop processing |
| Merge | | Combine branches |
"availableInMCP": truehttp://localhost:5678/mcp-server/httpresponseMode: "responseNode"/webhook-test/