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