I'm searching an example of Telegram API usage with Google Apps Script, or anyone/anything that can help me to learn how to use this API, for instance to send a message to a certain user
相关问题
- How can I force all files in a folder to be owned
- Google Apps Script: testing doPost() with cURL
- Google Apps Script to turn in, grade, and return a
- How do you remove reply keyboard without sending a
- Script fails on SpreadsheetApp.openById - Requires
相关文章
- How to allow access for importrange function via a
- Google app script trigger not working
- Set Date/Time to 00:00:00
- indexOf returning -1 despite object being in the a
- How can my Google Apps Script be run by others the
- How to stop execution of Google Apps Script?
- Profiling the Performance of a Google App Script
- Telegram Bot “chat not found”
I was searching for something similar, and couldn't find any, so I have made my own, I will write it down here perhaps someone would make use of it.
This is a simple proof of concept that works:
Other commands can be made same way.
I actively monitor Google Apps Script examples and I am not aware of samples integrating to the Telegram API. Given the level of security encryption required with the Telegram API I would suggest an integration with this service is unlikely due to Apps Script runtime limits.
I haven't found any examples to date of sending messages to a user but the Telegram service has posted large amounts of code, including their web client code, on Github and this would seem to be the best starting point for now.
Update: Telegram have created a Bot API which allows third party scripts to run in Telegram. The advantage of the Bot API is you don't need to do any message encryption. The PHP code sample could easily be ported to Apps Script.