Telegram bot: receiving/downloading uploaded files

I have a Telegram bot set up and now I’m curious whether or not I can receive/download the files I upload to the bot.

I haven’t found a lot of information, though the Telegram API makes it possible generally. When I listen to the events in the developer tools though, I don’t see anything related to files in the relevant event

Do you know a way to do this or am I out of luck?

You want to download attachments from Telegram to HA? I wonder what the usecase is?

Exactly :slight_smile: I use Appdaemon for some more complex apps and one of them keeps my music on Google Drive up2date by checking my relevant YouTube playlists.

I don’t have any logic for when I want to use local files instead of downloading them from YouTube. Since I use the bot to set metadata etc. I’m interested, if I can do the actual file using Telegram too

Basically:

  1. Upload music file to bot
  2. App saves it with some data locally
  3. Bot prompts me to set metadata like it does with YouTube music
  4. Bot sets metadata using ffmpeg and uploads file to Google Drive

Might be overkill so I’m still pondering, if I even do it instead of doing the steps manually

If you search the community forum you will most like find this https://community.home-assistant.io/t/telegram-bot-support-for-downloading-attachments/37525
Not sure if it is helpful for you though.

Seem like they supported it at some point but not anymore. My tests also didn’t contain any file related parameters :confused: