Telegram Audio to Notion

I have build a Telegram bot to record voice messages. These voice messages are transcribed and uploaded to my Notion page. I use this to send Ideas to Notion. GPT structures the Ideas and creates a summary for me. I also would love to upload the audio file from Telegram into Notion. This only works with a URL (as far as I know).

I can tried to upload the audio-file into Google Drive. This works. I can also listen to the audio-file in Google Drive. However, Notion cannot read this link.

Is there a possibility to put Telegram audio into Notion?

Hey Andrej,

In downloading the file from Telegram, please try to follow these steps here:

In this case, you will need two HTTP Get a file module to be able to extract the file/image from that Telegram message.

api - How do I download a file or photo that was sent to my Telegram bot? - Stack Overflow.

​Steps:

​

​1.) After the Watch Module, add a Get A File HTTP Module (1) then use this as the URL:

​

https://api.telegram.org/bot<bot_token>/getFile?file_id=the_file_id

​

Note: Please make sure to use the FILE ID from the ATTACHMENT as if the image is sent as a PHOTO OR VIDEO, for some reason, the Telegram server is sending the thumbnail, not the actual image itself. It should be attached as a FILE.

​

2.) After the Get a File module, add a “Parse JSON” module then map the DATA. This will then parse the JSON format into a mappable/understandable format.

​

3.) Add another Get a file HTTP module then use this as a URL:

https://api.telegram.org/file/bot<token>/<file_path>

​

The last HTTP module will then give you the DATA and FILENAME. Then try to store the record to a drive let’s say Google Drive, Upload a File module. Then next is then map the “web content URL” from the Gdrive module to that URL field for the audio in your Notion module.

I hope this helps!

2 Likes