From 6737ef09c835410a2a0a71682c39bc9327eaeb95 Mon Sep 17 00:00:00 2001 From: Lucas Berger Date: Fri, 30 Jan 2026 08:48:04 -0500 Subject: [PATCH] feat(03-03): clean up UI after batch action - Add Answer Batch Query to dismiss callback loading state - Add Delete Batch Confirm Message to remove confirmation message - Add Send Batch Result to display final success/failure message - Wire up complete flow: Format Result -> Answer -> Delete -> Send - UI cleanup keeps chat clean with only result message remaining --- n8n-workflow.json | 97 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/n8n-workflow.json b/n8n-workflow.json index 1bdb91a..e7d2128 100644 --- a/n8n-workflow.json +++ b/n8n-workflow.json @@ -988,6 +988,70 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [2220, 800] + }, + { + "parameters": { + "method": "POST", + "url": "=https://api.telegram.org/bot{{ $credentials.telegramApi.accessToken }}/answerCallbackQuery", + "sendBody": true, + "specifyBody": "json", + "jsonBody": "={{ JSON.stringify({ callback_query_id: $json.queryId }) }}", + "options": {} + }, + "id": "http-answer-batch-query", + "name": "Answer Batch Query", + "type": "n8n-nodes-base.httpRequest", + "typeVersion": 4.2, + "position": [2440, 800], + "credentials": { + "telegramApi": { + "id": "telegram-credential", + "name": "Telegram API" + } + } + }, + { + "parameters": { + "method": "POST", + "url": "=https://api.telegram.org/bot{{ $credentials.telegramApi.accessToken }}/deleteMessage", + "sendBody": true, + "specifyBody": "json", + "jsonBody": "={{ JSON.stringify({ chat_id: $('Format Batch Result').item.json.chatId, message_id: $('Format Batch Result').item.json.messageId }) }}", + "options": {} + }, + "id": "http-delete-batch-confirm-msg", + "name": "Delete Batch Confirm Message", + "type": "n8n-nodes-base.httpRequest", + "typeVersion": 4.2, + "position": [2660, 800], + "credentials": { + "telegramApi": { + "id": "telegram-credential", + "name": "Telegram API" + } + } + }, + { + "parameters": { + "resource": "message", + "operation": "sendMessage", + "chatId": "={{ $('Format Batch Result').item.json.chatId }}", + "text": "={{ $('Format Batch Result').item.json.message }}", + "additionalFields": { + "parse_mode": "HTML" + } + }, + "id": "telegram-send-batch-result", + "name": "Send Batch Result", + "type": "n8n-nodes-base.telegram", + "typeVersion": 1.2, + "position": [2880, 800], + "credentials": { + "telegramApi": { + "id": "telegram-credential", + "name": "Telegram API" + } + } } ], "connections": { @@ -1449,6 +1513,39 @@ } ] ] + }, + "Format Batch Result": { + "main": [ + [ + { + "node": "Answer Batch Query", + "type": "main", + "index": 0 + } + ] + ] + }, + "Answer Batch Query": { + "main": [ + [ + { + "node": "Delete Batch Confirm Message", + "type": "main", + "index": 0 + } + ] + ] + }, + "Delete Batch Confirm Message": { + "main": [ + [ + { + "node": "Send Batch Result", + "type": "main", + "index": 0 + } + ] + ] } }, "pinData": {},