I have configured a switch node in a workflow with regex. If a value is met twice or three times, it should go all the necessary paths.
Unfortunately in my example it is runnig only to path0 for the example value of “Tarif” = “BP700”.
For this example value it should go through outputKey0 and outputKey1. How can I achieve that?
Thank you!
switch node config
{
"parameters": {
"dataType": "string",
"value1": "={{ $('Merge').item.json.rawRequest.Tarif }}",
"rules": {
"rules": [
{
"operation": "regex",
"value2": "BP(300|700|900|1100)",
"outputKey": "0"
},
{
"operation": "regex",
"value2": "BP(400|700|900|1100)",
"outputKey": "1"
},
{
"value2": "BP250",
"outputKey": "2"
},
{
"operation": "regex",
"value2": "BP(100|200|900|1100)",
"outputKey": "3"
}
]
}
},
"id": "21281a8a-71ee-4340-90d5-5bd1bc6bd95b",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"typeVersion": 2,
"position": [
1020,
1060
]
}
Information on your n8n setup
- n8n version: 1.15.2
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): docker
- Operating system: Ubuntu 22.04