I am currently tasked to send realtime data that I stored in firestore to telegram. When I watch online tutorials, I mainly see people using realtime database to send data to telegram instead of firestore. I would like to know, is it possible to send data that is stored in firestore to telegram?
Question posted in Telegram API
A comprehensive official documentation can be found here.
A comprehensive official documentation can be found here.
2
Answers
There is nothing in the Firebase APIs that automatically sends data in Firestore to Telegram, but since both have Firestore and Telegram have APIs you can build this functionality yourself.
A common approach would be to create this as a Cloud Function, which is a piece of code that automatically gets triggered when you write to Firestore (in this case). In that Cloud Function you then take the data from Firestore and call the Telegram API. When I search for this, there are some promising results here.
So, yes you can do it. Here the simple example on Python language.
Look the all docs here: https://firebase.google.com/docs/firestore/query-data/get-data and
https://firebase.google.com/docs/firestore/quickstart
Dont forge to create telegram bot and add code there)