Telegram "Send Document" inline keyboard NOT working

There’s an error on Telegram Node: it does not allow to send the document with an inline keyboard with it. Telegram API has all the insctructions and I have been using it with PHP, but I just can’t get it to work on N8N. Any ideas over there?

Hey @NatanRufino,

Can you be more specific? What error are you seeing and what version of n8n are you using?

Are you also able to share the workflow you are trying to use?

Hi there! At first, sorry for the delay… I have not got your message earlier.
Well, I’m using “N8N 1.54.4”. The problem is as simple as I have told earlier. Let me try to say it with some other words: There is a Method on Telegram Bot API called “sendDocument” and one of its optional paramenters is called “reply_markup” where you can use an “InlineKeyboard”. So, in the specifc Telegram Node for “sending documents” I could not use those options, it simply does not work. The Node send the Document, but does not allow using the “inline keyboard”.

I also can’t remember the error I got at the time, but it did not allow me to use inline keyboards. You could try just by adding a Telegam Send a Document Node and try it.

I encountered this error, and here is the Error details:

{
“errorMessage”: “source.on is not a function”,
“errorDetails”: {
“rawErrorMessage”: [
“source.on is not a function”
]
},
“n8nDetails”: {
“nodeName”: “AttachTranscript”,
“nodeType”: “n8n-nodes-base.telegram”,
“nodeVersion”: 1.2,
“resource”: “message”,
“operation”: “sendDocument”,
“time”: “2/23/2025, 12:46:58 PM”,
“n8nVersion”: “1.79.3 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“NodeApiError: source.on is not a function”,
" at ExecuteContext.apiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Telegram/GenericFunctions.js:118:15)“,
" at processTicksAndRejections (node:internal/process/task_queues:95:5)”,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Telegram/Telegram.node.js:1789:36)“,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:627:19)”,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:878:51",
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:1211:20"
]
}
}

This looks like the bug reported on ERROR: source.on is not a function in Telegram (photo with buttons) - #5 by artildo (not sure if a PR was actually submitted)

If I disabled “Binary” and simply send a file_id, the “Send Document” worked and Inline Keyboard showed up.