fix(telegram): use HTTP Request for editMessageText with keyboards

The n8n Telegram node's inlineKeyboard parameter doesn't work reliably
with editMessageText operation. Switched to HTTP Request node calling
Telegram API directly, which properly passes reply_markup.

Changed nodes:
- Send Confirmation Dialog
- Send Stop Result
- Send Expired Message

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Lucas Berger
2026-02-04 22:07:20 -05:00
parent 0983a5f99a
commit 1a47176713
+27 -54
View File
@@ -4612,84 +4612,57 @@
}, },
{ {
"parameters": { "parameters": {
"operation": "editMessageText", "method": "POST",
"messageId": "={{ $json.messageId }}", "url": "=https://api.telegram.org/bot{{ $env.TELEGRAM_BOT_TOKEN }}/editMessageText",
"chatId": "={{ $json.chatId }}", "sendBody": true,
"text": "={{ $json.text }}", "specifyBody": "json",
"replyMarkup": "inlineKeyboard", "jsonBody": "={{ JSON.stringify({ chat_id: $json.chatId, message_id: $json.messageId, text: $json.text, parse_mode: 'HTML', reply_markup: $json.reply_markup }) }}",
"inlineKeyboard": "={{ JSON.stringify($json.reply_markup.inline_keyboard) }}", "options": {}
"additionalFields": {
"parse_mode": "HTML"
}
}, },
"id": "http-send-confirm-dialog", "id": "http-send-confirm-dialog",
"name": "Send Confirmation Dialog", "name": "Send Confirmation Dialog",
"type": "n8n-nodes-base.telegram", "type": "n8n-nodes-base.httpRequest",
"typeVersion": 1.2, "typeVersion": 4.2,
"position": [ "position": [
2440, 2440,
1400 1400
], ]
"credentials": {
"telegramApi": {
"id": "I0xTTiASl7C1NZhJ",
"name": "Telegram account"
}
}
}, },
{ {
"parameters": { "parameters": {
"operation": "editMessageText", "method": "POST",
"messageId": "={{ $json.messageId }}", "url": "=https://api.telegram.org/bot{{ $env.TELEGRAM_BOT_TOKEN }}/editMessageText",
"chatId": "={{ $json.chatId }}", "sendBody": true,
"text": "={{ $json.text }}", "specifyBody": "json",
"replyMarkup": "inlineKeyboard", "jsonBody": "={{ JSON.stringify({ chat_id: $json.chatId, message_id: $json.messageId, text: $json.text, parse_mode: 'HTML', reply_markup: $json.reply_markup }) }}",
"inlineKeyboard": "={{ JSON.stringify($json.reply_markup.inline_keyboard) }}", "options": {}
"additionalFields": {
"parse_mode": "HTML"
}
}, },
"id": "http-send-stop-result", "id": "http-send-stop-result",
"name": "Send Stop Result", "name": "Send Stop Result",
"type": "n8n-nodes-base.telegram", "type": "n8n-nodes-base.httpRequest",
"typeVersion": 1.2, "typeVersion": 4.2,
"position": [ "position": [
2440, 2440,
1500 1500
], ]
"credentials": {
"telegramApi": {
"id": "I0xTTiASl7C1NZhJ",
"name": "Telegram account"
}
}
}, },
{ {
"parameters": { "parameters": {
"operation": "editMessageText", "method": "POST",
"messageId": "={{ $json.messageId }}", "url": "=https://api.telegram.org/bot{{ $env.TELEGRAM_BOT_TOKEN }}/editMessageText",
"chatId": "={{ $json.chatId }}", "sendBody": true,
"text": "={{ $json.text }}", "specifyBody": "json",
"replyMarkup": "inlineKeyboard", "jsonBody": "={{ JSON.stringify({ chat_id: $json.chatId, message_id: $json.messageId, text: $json.text, parse_mode: 'HTML', reply_markup: $json.reply_markup }) }}",
"inlineKeyboard": "={{ JSON.stringify($json.reply_markup.inline_keyboard) }}", "options": {}
"additionalFields": {
"parse_mode": "HTML"
}
}, },
"id": "http-send-expired-msg", "id": "http-send-expired-msg",
"name": "Send Expired Message", "name": "Send Expired Message",
"type": "n8n-nodes-base.telegram", "type": "n8n-nodes-base.httpRequest",
"typeVersion": 1.2, "typeVersion": 4.2,
"position": [ "position": [
2440, 2440,
1700 1700
], ]
"credentials": {
"telegramApi": {
"id": "I0xTTiASl7C1NZhJ",
"name": "Telegram account"
}
}
}, },
{ {
"parameters": { "parameters": {