n8n-4-conditional-branching-and-error-handling
Sub-skill of n8n: 4. Conditional Branching and Error Handling.
Best use case
n8n-4-conditional-branching-and-error-handling is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sub-skill of n8n: 4. Conditional Branching and Error Handling.
Teams using n8n-4-conditional-branching-and-error-handling 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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/4-conditional-branching-and-error-handling/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How n8n-4-conditional-branching-and-error-handling Compares
| Feature / Agent | n8n-4-conditional-branching-and-error-handling | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sub-skill of n8n: 4. Conditional Branching and Error Handling.
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.
SKILL.md Source
# 4. Conditional Branching and Error Handling
## 4. Conditional Branching and Error Handling
```json
{
"name": "Order Processing with Error Handling",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "process-order",
"responseMode": "responseNode"
},
"id": "webhook",
"name": "Order Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1.1,
"position": [240, 300]
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"id": "condition-1",
"leftValue": "={{ $json.order_total }}",
"rightValue": 1000,
"operator": {
"type": "number",
"operation": "gte"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "switch",
"name": "High Value Order?",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [460, 300]
},
{
"parameters": {
"url": "https://api.payment.com/process",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "order_id",
"value": "={{ $json.order_id }}"
},
{
"name": "amount",
"value": "={{ $json.order_total }}"
},
{
"name": "priority",
"value": "high"
}
]
},
"options": {}
},
"id": "high-value-payment",
"name": "Process High Value",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [680, 200],
"onError": "continueErrorOutput"
},
{
"parameters": {
"url": "https://api.payment.com/process",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "order_id",
"value": "={{ $json.order_id }}"
},
{
"name": "amount",
"value": "={{ $json.order_total }}"
},
{
"name": "priority",
"value": "normal"
}
]
}
},
"id": "normal-payment",
"name": "Process Normal",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [680, 400],
"onError": "continueErrorOutput"
},
{
"parameters": {
"jsCode": "// Handle payment error\nconst error = $input.item.json;\n\nreturn {\n status: 'failed',\n error_message: error.message || 'Payment processing failed',\n order_id: $('Order Webhook').item.json.order_id,\n timestamp: new Date().toISOString(),\n retry_eligible: true\n};"
},
"id": "error-handler",
"name": "Handle Error",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [900, 500]
},
{
"parameters": {
"channel": "#alerts",
"text": "=Payment Failed!\n\nOrder ID: {{ $json.order_id }}\nError: {{ $json.error_message }}\nRetry Eligible: {{ $json.retry_eligible }}",
"otherOptions": {}
},
"id": "slack-alert",
"name": "Alert Team",
"type": "n8n-nodes-base.slack",
"typeVersion": 2.1,
"position": [1120, 500],
"credentials": {
"slackApi": {
"id": "3",
"name": "Slack Bot"
}
}
},
{
"parameters": {
"mode": "combine",
"combineBy": "combineAll",
"options": {}
},
"id": "merge",
"name": "Merge Results",
"type": "n8n-nodes-base.merge",
"typeVersion": 2.1,
"position": [900, 300]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ JSON.stringify({ status: 'processed', order_id: $json.order_id }) }}"
},
"id": "respond-success",
"name": "Success Response",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [1120, 300]
}
],
"connections": {
"Order Webhook": {
"main": [
[{ "node": "High Value Order?", "type": "main", "index": 0 }]
]
},
"High Value Order?": {
"main": [
[{ "node": "Process High Value", "type": "main", "index": 0 }],
[{ "node": "Process Normal", "type": "main", "index": 0 }]
]
},
"Process High Value": {
"main": [
[{ "node": "Merge Results", "type": "main", "index": 0 }],
[{ "node": "Handle Error", "type": "main", "index": 0 }]
]
},
"Process Normal": {
"main": [
[{ "node": "Merge Results", "type": "main", "index": 1 }],
[{ "node": "Handle Error", "type": "main", "index": 0 }]
]
},
"Handle Error": {
"main": [
[{ "node": "Alert Team", "type": "main", "index": 0 }]
]
},
"Merge Results": {
*Content truncated — see parent skill for full reference.*Related Skills
tax-form-currency-field-handling
Handle currency field rounding and formatting quirks when entering precise decimal values into tax software forms
diagnose-venv-shebang-import-errors
Debugging pattern for ModuleNotFoundError when CLI entry points use wrong Python interpreter
diagnose-shebang-virtualenv-import-errors
Debugging pattern for ModuleNotFoundError when CLI entry points use wrong Python interpreter
diagnose-shebang-venv-import-errors
Troubleshoot ModuleNotFoundError in CLI tools by identifying shebang-venv mismatches
diagnose-dirty-ntfs-mount-errors
Troubleshoot NTFS mount failures by identifying dirty volume flags and driver type
debug-toml-section-scoping-errors
Diagnose and fix TOML configuration errors caused by misplaced key-value pairs in named sections
batch-syntax-repair-from-injection-errors
Detect and fix systematic syntax errors caused by line-injection scripts that split multiline constructs
bash-pipefail-grep-error-handling
Handle grep exit codes safely under set -eo pipefail by isolating pipeline failure scope
bash-cli-framework-5-error-handling
Sub-skill of bash-cli-framework: 5. Error Handling (+1).
instrument-data-allotrope-calculated-data-handling
Sub-skill of instrument-data-allotrope: Calculated Data Handling.
activepieces-8-error-handling-and-retry-logic
Sub-skill of activepieces: 8. Error Handling and Retry Logic.
activepieces-4-branching-and-conditional-logic
Sub-skill of activepieces: 4. Branching and Conditional Logic.