fix(10.1-06): fix batch text command data flow through matching sub-workflow

Added "Prepare Batch Execution" Code node between Route Batch Match Result
and Route Batch Action to transform matching sub-workflow output:
- matchedContainers -> allMatched (field name expected by downstream nodes)
- action from Detect Batch Command (stop/start/restart) instead of
  "batch_matched" routing label from sub-workflow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lucas Berger
2026-02-08 09:02:47 -05:00
parent aae95e2405
commit 6824697295
+25 -1
View File
@@ -4777,6 +4777,19 @@
1945, 1945,
1100 1100
] ]
},
{
"parameters": {
"jsCode": "// Transform matching sub-workflow output to batch execution format\nconst matchResult = $input.item.json;\nconst batchCmd = $('Detect Batch Command').item.json;\n\nreturn {\n json: {\n allMatched: matchResult.matchedContainers,\n action: batchCmd.action,\n chatId: matchResult.chatId,\n messageId: batchCmd.messageId || 0,\n originalContainerNames: matchResult.originalContainerNames\n }\n};"
},
"id": "code-prepare-batch-execution",
"name": "Prepare Batch Execution",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
2110,
-300
]
} }
], ],
"connections": { "connections": {
@@ -6559,7 +6572,7 @@
"main": [ "main": [
[ [
{ {
"node": "Route Batch Action", "node": "Prepare Batch Execution",
"type": "main", "type": "main",
"index": 0 "index": 0
} }
@@ -6615,6 +6628,17 @@
} }
] ]
] ]
},
"Prepare Batch Execution": {
"main": [
[
{
"node": "Route Batch Action",
"type": "main",
"index": 0
}
]
]
} }
}, },
"pinData": {}, "pinData": {},