From 138728a7b1f2fc90636cb6de8ef6adcf451717a9 Mon Sep 17 00:00:00 2001 From: Lucas Berger Date: Sun, 8 Feb 2026 08:55:47 -0500 Subject: [PATCH] fix(10.1-06): fix action type passthrough and text status routing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Prepare Text Action Input now reads action (stop/start/restart) from Parse Action Command instead of matching sub-workflow's actionType field - Added "Has Status Message ID" If node to route status_direct results: messageId > 0 → Edit Container List (callback), messageId == 0 → Send Container Submenu Direct (text command) - Pre-existing bug: text "status " routed to editMessageText with messageId 0, causing Telegram API error Co-Authored-By: Claude Opus 4.6 --- n8n-workflow.json | 54 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/n8n-workflow.json b/n8n-workflow.json index e960a53..45ae829 100644 --- a/n8n-workflow.json +++ b/n8n-workflow.json @@ -3229,7 +3229,7 @@ }, { "parameters": { - "jsCode": "// Prepare input for container actions sub-workflow\nconst data = $input.item.json;\nconst containerId = data.containerId;\nconst containerName = data.containerName;\nconst actionType = data.actionType || 'restart';\nconst chatId = data.chatId;\n\nreturn {\n json: {\n containerId: containerId,\n containerName: containerName,\n action: actionType,\n chatId: chatId,\n messageId: 0, // Text mode doesn't have a message to edit\n responseMode: 'text'\n }\n};" + "jsCode": "// Prepare input for container actions sub-workflow\nconst data = $input.item.json;\nconst containerId = data.containerId;\nconst containerName = data.containerName;\n// Get the actual requested action (stop/start/restart) from Parse Action Command\nconst actionType = $('Parse Action Command').item.json.action || 'restart';\nconst chatId = data.chatId;\n\nreturn {\n json: {\n containerId: containerId,\n containerName: containerName,\n action: actionType,\n chatId: chatId,\n messageId: 0, // Text mode doesn't have a message to edit\n responseMode: 'text'\n }\n};" }, "id": "code-prepare-text-action-rr53pd94", "name": "Prepare Text Action Input", @@ -4732,6 +4732,38 @@ 2000, -300 ] + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "loose" + }, + "conditions": [ + { + "id": "has-message-id", + "leftValue": "={{ $json.messageId }}", + "rightValue": 0, + "operator": { + "type": "number", + "operation": "gt" + } + } + ], + "combinator": "and" + }, + "options": {} + }, + "id": "if-has-status-message-id", + "name": "Has Status Message ID", + "type": "n8n-nodes-base.if", + "typeVersion": 2, + "position": [ + 1890, + 1000 + ] } ], "connections": { @@ -6165,7 +6197,7 @@ ], [ { - "node": "Edit Container List", + "node": "Has Status Message ID", "type": "main", "index": 0 } @@ -6541,6 +6573,24 @@ } ] ] + }, + "Has Status Message ID": { + "main": [ + [ + { + "node": "Edit Container List", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "Send Container Submenu Direct", + "type": "main", + "index": 0 + } + ] + ] } }, "pinData": {},