Describe the problem/error/question
Switch node configured for rules is switching based on values in item 1, but I want the output to retain both item 1 and 2 and only item 1 is being passed.
Please share your workflow
{
"meta": {
"instanceId": "545c531a0d167fb52e16d680acf7ab3bbf63b448d1250afffc090d6b18434529"
},
"nodes": [
{
"parameters": {
"authentication": "predefinedCredentialType",
"nodeCredentialType": "fabricApi",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
},
{
"name": "token",
}
]
},
"options": {}
},
"id": "b6843e2c-58d1-4d03-aadc-2dc65dc5f7d2",
"name": "Fabric Search for Record",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 3,
"position": [
1500,
-260
],
"alwaysOutputData": true,
"credentials": {
"fabricApi": {
"id": "4",
"name": "Fabric QA"
}
},
"continueOnFail": true
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json.data.id }}",
"operation": "isNotEmpty"
}
]
}
},
"id": "3de64bfc-8938-44f5-a36e-25716f5e59b9",
"name": "If Fabric Record Exists",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
1720,
-260
]
},
{
"parameters": {
"method": "POST",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "fabricApi",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
},
{
"name": "token",
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{ \"category\": \"Feature\", \"titles\": [ { \"type\": \"title\", \"title\": \"Test\", \"locale\": \"ENG\" } ] }",
"options": {}
},
"id": "cbb1153a-17fb-4a37-92ae-955591b0452a",
"name": "Fabric Update Record",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 3,
"position": [
2080,
-360
],
"credentials": {
"fabricApi": {
"id": "4",
"name": "Fabric QA"
}
}
},
{
"parameters": {
"mode": "chooseBranch",
"output": "input2"
},
"id": "6f18eace-e2a6-4ca4-a79b-bdb638a43b80",
"name": "Merge2",
"type": "n8n-nodes-base.merge",
"typeVersion": 2,
"position": [
2080,
-100
]
}
],
"connections": {
"Fabric Search for Record": {
"main": [
[
{
"node": "If Fabric Record Exists",
"type": "main",
"index": 0
}
]
]
},
"If Fabric Record Exists": {
"main": [
[
{
"node": "Fabric Update Record",
"type": "main",
"index": 0
}
],
[
{
"node": "Merge2",
"type": "main",
"index": 0
}
]
]
}
}
}
Share the output returned by the last node
Information on your n8n setup
-
n8n version:
0.219.1 -
Database (default: SQLite):
PostgreSQL - n8n EXECUTIONS_PROCESS setting (default: own, main):
-
Running n8n via (Docker, npm, n8n cloud, desktop app):
Docker - Operating system: