ERROR: source.on is not a function in Telegram (photo with buttons)

When I send a photo message via Telegram, no errors
Once I add a button, I get this error:

NodeApiError: source.on is not a function
    at Object.apiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Telegram/GenericFunctions.js:82:15)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Telegram/Telegram.node.js:1674:36)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:652:28)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:592:53

The workflow:

Hi @artildo - Sorry to hear you’re running into this!

Does this post from Tom help you out?

@EmeraldHerald This is some other case. I do know how to use inline buttons. The point is that for the Photo message they give error.

Hi @artildo - you should be able to send an image by selecting ‘Message’ as the Resource and ‘Send Photo’ as the Operation in the Telegram node. Then in the Photo field, you can either pass a file_id for photos that already exist on the Telegram server or pass an HTTPS URL for Telegram to get a photo from the internet.

Hope that helps! If it doesn’t, we may need some more information about your workflow and what you’re trying to do :bowing_man:

@EmeraldHerald Hmm. Looks like a bug. You approach works. But if I send binary data — it doesn’t: See below:

Send URL:

Send Binary

Hmmm, maybe @mutedjam or @jon tomorrow when both are back in can help confirm expected behaviour :thinking:

1 Like

Thanks so much for reporting this @artildo! I’ll add this to our bug tracker for a fix.

3 Likes

Hey @MutedJam
Indeed it’s a bug, I’m able to reproduce it.
Is this being fixed? or I’m happy to raise a PR

1 Like

Hi @mcnaveen - I can confirm that our engineers haven’t started working on this yet, and it’s in the backlog. Feel free to create a PR :+1:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.