From e4a7098e0df2f77cff9edebcd8f2428090dd8e62 Mon Sep 17 00:00:00 2001 From: Lucas Berger Date: Wed, 4 Feb 2026 13:54:18 -0500 Subject: [PATCH] feat(10-05): wire batch update to Container Update sub-workflow - Add Prepare Batch Update Input node to format sub-workflow input - Add Execute Batch Update node calling Container Update sub-workflow - Add Handle Batch Update Result node to process results - Connect update path (output 0) in Route Batch Loop Action - Node count: 209 -> 212 (+3) This completes the batch update integration with the modular sub-workflow, eliminating the need for duplicate update logic in the main workflow. --- n8n-workflow.json | 85 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 84 insertions(+), 1 deletion(-) diff --git a/n8n-workflow.json b/n8n-workflow.json index 4f2a732..e9288c9 100644 --- a/n8n-workflow.json +++ b/n8n-workflow.json @@ -5194,6 +5194,50 @@ 2880, 1650 ] + }, + { + "parameters": { + "jsCode": "// Prepare input for Container Update sub-workflow\nconst data = $json;\nconst container = data.container;\n\n// Extract container info\nconst containerId = container.id || container.Id || '';\nconst containerName = container.name || container.Name || '';\n\nreturn {\n json: {\n containerId: containerId,\n containerName: containerName,\n chatId: data.chatId,\n messageId: data.progressMessageId || 0,\n responseMode: \"inline\"\n }\n};" + }, + "id": "caeae5d6-f9ec-4aa3-83d3-198b6b55be65", + "name": "Prepare Batch Update Input", + "type": "n8n-nodes-base.code", + "typeVersion": 2, + "position": [ + 4000, + -800 + ] + }, + { + "parameters": { + "workflowId": { + "__rl": true, + "mode": "list", + "value": "7AvTzLtKXM2hZTio92_mC" + }, + "options": {} + }, + "id": "720b6da1-60e6-4ec4-8a5f-d403ad05994c", + "name": "Execute Batch Update", + "type": "n8n-nodes-base.executeWorkflow", + "typeVersion": 1.2, + "position": [ + 4220, + -800 + ] + }, + { + "parameters": { + "jsCode": "// Handle update result from sub-workflow\nconst data = $('Build Progress Message').item.json;\nconst result = $json;\n\n// Update counters based on result\nlet successCount = data.successCount || 0;\nlet failureCount = data.failureCount || 0;\nlet warningCount = data.warningCount || 0;\n\nif (result.success) {\n successCount++;\n} else {\n failureCount++;\n}\n\n// Add to results array\nconst results = data.results || [];\nresults.push({\n container: data.containerName,\n action: 'update',\n success: result.success,\n message: result.message || ''\n});\n\nreturn {\n json: {\n ...data,\n successCount: successCount,\n failureCount: failureCount,\n warningCount: warningCount,\n results: results\n }\n};" + }, + "id": "f5576e75-8cfa-4ac3-9fea-64fae8d31bec", + "name": "Handle Batch Update Result", + "type": "n8n-nodes-base.code", + "typeVersion": 2, + "position": [ + 4440, + -800 + ] } ], "connections": { @@ -6751,7 +6795,13 @@ }, "Route Batch Loop Action": { "main": [ - [], + [ + { + "node": "Prepare Batch Update Input", + "type": "main", + "index": 0 + } + ], [ { "node": "Build Batch Action Command", @@ -7448,6 +7498,39 @@ } ] ] + }, + "Prepare Batch Update Input": { + "main": [ + [ + { + "node": "Execute Batch Update", + "type": "main", + "index": 0 + } + ] + ] + }, + "Execute Batch Update": { + "main": [ + [ + { + "node": "Handle Batch Update Result", + "type": "main", + "index": 0 + } + ] + ] + }, + "Handle Batch Update Result": { + "main": [ + [ + { + "node": "Prepare Next Iteration", + "type": "main", + "index": 0 + } + ] + ] } }, "pinData": {},