Send binary as Telegram photo

Hi guys, nice job with new n8n version, really cool

Describe the issue/error/question

I’m trying to get some photos attachment from a gmail account and send in a telegram private channel.
All the flow works well, but when it has to send the telegram photo it behave in a non deterministic way, same input value may works or rise an error.

What is the error message (if any)?

ERROR: UNKNOWN ERROR - check the detailed error for more information

data should be a string, Buffer or Uint8Array
Data below may contain sensitive information. Proceed with caution when sharing.
"cause": {
"error": {
"options": {
NodeApiError: UNKNOWN ERROR - check the detailed error for more information
    at Object.apiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Telegram/GenericFunctions.js:84:15)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Telegram/Telegram.node.js:1835:36)
    at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:447:47

Please share the workflow

Share the output returned by the last node


Information on your n8n setup

  • n8n version: 0.158.0
  • Database you’re using (default: SQLite): Postgres
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm,, desktop app]: Docker

Hi @cingiu, welcome to the community and sorry to hear you’re having trouble here.

From your description it sounds not all items sent to the Telegram node you have shared might have a binary named attachment_0.

Is there a chance your Gmail node occasionally picks up messages without attachments or processes emails with empty attachments?

Thanks @MutedJam for the quick reply!
I have a node before the telegram ones that take care of filtering all the mail without attachment.
It’s output is always 2 items with attachments

Thanks! And are both items passed on to the node from your screenshot valid photo files? You can check this in n8n on the binary tab of the previous Function node:

yes it has correct amount of binary
also if i click on show binary data button it shows me the actual photos

Many thanks! I was now able to reproduce this (took me a while to get my ancient phone to register with Telegram). From playing around with this, it seems the presence of the Disable Notification field is the culprit here.

Could you try removing it by clicking the bin icon next to it and let me know whether you can confirm the same (not just disabling the option, actually removing the field)?


1 Like

OMG seems the real culprit here, amazing.

Thanks you so much, if it will be fixed let me know because it would be a nice feature for me


Yeah, this option should, of course, not break anything. I’ve added it to our internal bug tracker and we will, of course, let you know once this has been fixed.

1 Like