Telegram Node: getFile method [GOT CREATED]

Hi, i would like to request to add the getFile method (Resource) to the Telegram node.

Use-Case:
Whenever a file is uploaded and received via Telegram Trigger, the received data contains only the file_id.
Now, to get the download link for the file, one only needs to call:
https://api.telegram.org/bot<token>/getFile?file_id=<file_id>
which returns the file_path property.
The file is then available to be downloaded from:
https://api.telegram.org/file/bot<token>/<file_path>

(Ref.: Telegram Bot API)

This can be done via a HTTP node, as a workaround, but that’s certainly not ideal as the bot token (which is already available in the Telegram Credential) also needs to be set again.

Thanks.

If you go to additional fields you are gonna find a field called Download Images. Set it to true and the trigger will automatically download the files.

2 Likes

@RicardoE105 Thanks for the information!

This certainly helps for the cases where the downloaded file needs to be used directly.

For all other cases, where just the download link is required, an additional option for “Document Link” would be quite handy.

@shrey-42 Got added. We will let you know when is released.

2 Likes

@RicardoE105 Awesome, thanks!

Changed it to “File → Get” with a download option instead to not leak the accessToken. Got merged and will be released with the next version.

Got released with [email protected]

1 Like

thank you

that was relay helpful

1 Like