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": {},