fix: Replace IF nodes with Switch nodes in n8n workflow

- Changed from n8n-nodes-base.if (v2) to n8n-nodes-base.switch (v3)
- IF nodes were showing 'custom node' error in n8n
- Switch nodes are universally available in all n8n versions
- Both conditional nodes updated: Risk Check and Trade Success
- Workflow should now import without errors
This commit is contained in:
mindesbunister
2025-10-23 16:12:25 +02:00
parent 8ff5efbb6d
commit 0b9c60774f

View File

@@ -64,19 +64,41 @@
}, },
{ {
"parameters": { "parameters": {
"conditions": { "rules": {
"boolean": [ "values": [
{ {
"value1": "={{ $json.allowed }}", "conditions": {
"value2": true "options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"leftValue": "={{ $json.allowed }}",
"rightValue": true,
"operator": {
"type": "boolean",
"operation": "equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "allowed"
} }
] ]
},
"options": {
"fallbackOutput": "extra",
"allMatchingOutputs": false
} }
}, },
"id": "risk-check-condition", "id": "risk-check-condition",
"name": "Risk Check Passed?", "name": "Risk Check Passed?",
"type": "n8n-nodes-base.if", "type": "n8n-nodes-base.switch",
"typeVersion": 2, "typeVersion": 3,
"position": [850, 300] "position": [850, 300]
}, },
{ {
@@ -108,19 +130,41 @@
}, },
{ {
"parameters": { "parameters": {
"conditions": { "rules": {
"boolean": [ "values": [
{ {
"value1": "={{ $json.success }}", "conditions": {
"value2": true "options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"leftValue": "={{ $json.success }}",
"rightValue": true,
"operator": {
"type": "boolean",
"operation": "equals"
}
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "success"
} }
] ]
},
"options": {
"fallbackOutput": "extra",
"allMatchingOutputs": false
} }
}, },
"id": "trade-success-condition", "id": "trade-success-condition",
"name": "Trade Executed Successfully?", "name": "Trade Executed Successfully?",
"type": "n8n-nodes-base.if", "type": "n8n-nodes-base.switch",
"typeVersion": 2, "typeVersion": 3,
"position": [1250, 200] "position": [1250, 200]
}, },
{ {