fix(16): resolve 3 UAT issues — update flow, batch cancel, text commands
- Fix update sub-workflow: remove unsupported GraphQL filter arg, fix node reference (Format Pull Error → Format Update Error), fix field case (data.image → data.Image) - Fix batch cancel: connect Route Callback output 20 (batchcancel) to Prepare Batch UI Input (was empty connection array) - Fix text commands: change .item.json to .first().json for paired item breakage after GraphQL chain expansion; convert Send Batch Confirmation from Telegram node to HTTP Request to fix double-serialized reply_markup Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+19
-21
@@ -504,29 +504,21 @@
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "message",
|
||||
"operation": "sendMessage",
|
||||
"chatId": "={{ $json.chat_id }}",
|
||||
"text": "={{ $json.text }}",
|
||||
"additionalFields": {
|
||||
"parse_mode": "HTML",
|
||||
"reply_markup": "={{ JSON.stringify($json.reply_markup) }}"
|
||||
}
|
||||
"method": "POST",
|
||||
"url": "=https://api.telegram.org/bot{{ $env.TELEGRAM_BOT_TOKEN }}/sendMessage",
|
||||
"sendBody": true,
|
||||
"specifyBody": "json",
|
||||
"jsonBody": "={{ JSON.stringify({ chat_id: $json.chat_id, text: $json.text, parse_mode: 'HTML', reply_markup: $json.reply_markup }) }}",
|
||||
"options": {}
|
||||
},
|
||||
"id": "telegram-send-batch-confirm",
|
||||
"name": "Send Batch Confirmation",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"typeVersion": 1.2,
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [
|
||||
2000,
|
||||
500
|
||||
],
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "I0xTTiASl7C1NZhJ",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
@@ -3150,7 +3142,7 @@
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"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 correlationId: $input.item.json.correlationId || ''\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').first().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 correlationId: $input.item.json.correlationId || ''\n }\n};"
|
||||
},
|
||||
"id": "code-prepare-text-action-rr53pd94",
|
||||
"name": "Prepare Text Action Input",
|
||||
@@ -4709,7 +4701,7 @@
|
||||
},
|
||||
{
|
||||
"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};"
|
||||
"jsCode": "// Transform matching sub-workflow output to batch execution format\nconst matchResult = $input.item.json;\nconst batchCmd = $('Detect Batch Command').first().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",
|
||||
@@ -5634,7 +5626,13 @@
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[]
|
||||
[
|
||||
{
|
||||
"node": "Prepare Batch UI Input",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Handle Cancel": {
|
||||
@@ -7534,4 +7532,4 @@
|
||||
"tags": [],
|
||||
"triggerCount": 1,
|
||||
"active": false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user