Skip to content
Integrate Telegram ...
 
Notifications
Clear all

Integrate Telegram Audio with Notion

2 Posts
2 Users
0 Reactions
3 Views
Andrej_Uhrich
(@andrej_uhrich)
Posts: 1
New Member
Topic starter
 

I've developed a Telegram bot that records voice messages. These messages are then transcribed and uploaded to my Notion page. I use this setup to send ideas to Notion. GPT then structures these ideas and generates a summary for me. I'm also looking for a way to upload the audio file from Telegram directly into Notion. As far as I know, this is only possible via a URL.

I've experimented with uploading the audio file to Google Drive, and that process works. I can also play the audio file within Google Drive. However, Notion is unable to read this link.

Is there a method to get Telegram audio files into Notion?

 
Posted : 18/01/2024 5:16 pm
Jogger_Meister
(@jogger_meister)
Posts: 2
New Member
 

Hello,

To download the file from Telegram, please follow these instructions:

You will need two HTTP Get a File modules to extract the file/image from the 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 an HTTP Get a File Module (1) and use the following URL:

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

Note: Ensure you use the FILE ID from the ATTACHMENT. If the image is sent as a PHOTO OR VIDEO, the Telegram server might send the thumbnail instead of the actual image. It should be attached as a FILE.

2.) Following the Get a File module, add a “Parse JSON” module and map the DATA. This will convert the JSON format into a mappable/understandable format.

3.) Add another HTTP Get a File module and use this URL:

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

The final HTTP module will provide the DATA and FILENAME. You can then store the record to a drive, for example, using a Google Drive Upload a File module. Subsequently, map the “web content URL” from the Google Drive module to the URL field in your Notion module.

I hope this assists you!

 
Posted : 19/01/2024 8:53 am
Share: