According to researches by the adsmember team
टेलीग्राम बॉट को Google स्प्रैडशीट (Google Apps Script) से कनेक्ट करें। बेहतर ट्यूटोरियल: // नीचे पूर्ण स्क्रिप्ट: // अपने टेलीग्राम बॉट को Google स्प्रेडशीट (Google Apps स्क्रिप्ट) से कैसे कनेक्ट करें // // // ग्लोबल वेरिएबल टोकन, webAppUrl और ssId में भरें // var टोकन = “”; // अपना खुद का टोकन भरें टेलीग्राम यूआरएल = “ + टोकन; वर webAppUrl = “”; // अपना GOOGLE WEB APP पता भरें var ssId = “”; // अपने स्प्रेडशीट फ़ंक्शन की आईडी भरें getMe() { var url = telegramUrl + “/ getMe”; वर प्रतिक्रिया = UrlFetchApp.fetch (यूआरएल); Logger.log (response.getContentText ()); } फ़ंक्शन सेटवेबहुक() { var url = telegramUrl + “/setWebhook?url=” + webAppUrl; वर प्रतिक्रिया = UrlFetchApp.fetch (यूआरएल); Logger.log (response.getContentText ()); } फ़ंक्शन सेंडटेक्स्ट (आईडी, टेक्स्ट) { var url = telegramUrl + “/sendMessage?chat_id=” + id + “&text=” + text; वर प्रतिक्रिया = UrlFetchApp.fetch (यूआरएल); Logger.log (response.getContentText ()); } फ़ंक्शन doGet(e) {वापसी HtmlService.createHtmlOutput (“हाय वहाँ”); } function doPost(e) {// यह वह जगह है जहां टेलीग्राम काम करता है var data = JSON.parse(e.postData.contents); वर पाठ = data.message.text; वर आईडी = data.message.chat.id; वर नाम = data.message.chat.first_name + “” + data.message.chat.last_name; var उत्तर = “नमस्ते” + नाम + “, आपकी टिप्पणी के लिए धन्यवाद” + पाठ; भेजें टेक्स्ट (आईडी, उत्तर); स्प्रैडशीटऐप.ओपनबायआईड(एसएसआईडी)।गेटशीट्स ()[0].appendRow([new Date(),id,name,text,answer]); if(/^@/.test(text)) { वर शीटनाम = text.slice(1).split(“”)[0]; वर शीट = स्प्रेडशीटऐप.ओपनबीआईडी (एसएसआईडी)। getSheetByName (शीटनाम)? स्प्रैडशीटएप.ओपनबायआईड(एसएसआईडी)।गेटशीटबायनाम(शीटनाम): स्प्रेडशीटऐप.ओपनबीआईडी(एसएसआईडी)।इन्सर्टशीट(शीटनाम); वर टिप्पणी = text.split(” “).slice(1).join(” “); शीट.एपेंडरो ([new Date(),id,name,comment,answer]); } }
source
I've added code to send keyboard menu to the user, you can find it here: https://stackoverflow.com/questions/48431352/telegram-bot-keyboard-with-google-apps-script/72147367#72147367
Super nice! But, may I ask what's params 'e' for?
Thank Yuo
How to do the opposite?
From Google sheet to telegram?
Great tutorial. For some reason mine cannot connect to my google spreadsheet. I have the exact same code, but it doesn't connect. When I deploy as an app on that step, it doesn't even ask for the permissions. Do you know what could be the issue? I already tried with a new spreadsheet and same thing.
Wow, GENIUS…YOU KNOW YOUR STUFF. I can't get over how fast you done that.. Can you make bot to read a telegram message and send to CSV file?
Is it possibile to do the opposite? Call the BOT to see the output of the spreadsheet in telegram
Sir, I want to send messages in my bot or telegram channel from spreadsheet. Suppose I have saved a lot of message on spreadsheet and I want to post 3-4 message everyday in my telegram channel or bot. Can you make a video on this. No such video is present on youtube. Please help me
I couldn't get where you added trigger it is automatically triggering all the time
Hi i got this error: input 1 line it is saved to GGSheet but if enter multiple lines it wont save to GGsheet. How to fix this error? thank you
I have no idea why step on 7:05 does not work for me. Im not getting message asking permission to send email. and I do not get the email…
Thank you! Thank you! Thank you!
Thanks for the video this is awesome. however How can get Msg sender(customer) location ? plz reply
Переводчик нужен 😂
How can I send a bytton from Apps script?
thnku dear
it's not working
how to auth in google account directly from telegram? is it possible?
Thank you so much for the tutorial, very helpful!
How can you enter text in Telegram and have it populate different cells in a row?
This. is. awesome!!!! thank you so much!
Hi wim den Herder
i'm stuck at dopost. i didnt get any code to my mail id.
TypeError: Cannot read property 'postData' of undefined
doPost
@
i got this error
can you help me?
No
Hi newbie question, will the bot still work if you add it to a group?
really interesting stuff.. thank you wim
webapi must active ? if i want to use this telegram api?
Hello, how to run with getMe? My desktop showed that "No function to run"
Can you help me?
Hii bro you can made this bot for my group
I have tried the way you show, but the data from the telegram is not sent to email. I need to run manually using script apps but still, the content send to the email null
Hello sir,
I am your Subscriber
I want to send several different messages, with an interval of 1 hour, every hour it sends a random message! Would you help me?
How To Add Command In Telegram Bot With Google Sheets
Do you custom configure for a fee?
Hi, Thank you for this great tutorial!
Where I am trying to following video 13.27 to 14.05min this point.
function sendText(id,text) {
var url = telegramUrl + "/sendMessage?chat_id=" + id + "&text=" + text;
var response = UrlFetchApp.fetch(url);
Logger.log(response.getContentText());
}
function doPost(e){
//this is where telegram works
var data = JSON.parse(e.postData.contents);
var text = data.message.text;
var id = data.message.chat.id;
var name = data.message.chat.first_name +" "+ data.message.chat.last_name;
var answer = "Message Received!" + name +",This is fun (^V^)"+ text;
sendText(id,answer);
GmailApp.sendEmail(Session.getEffectiveUser().getEmail(),"Message sent to bot",answer);
}
Tried to run there is no response hence, I ran the sendText Code function.
Encountered an error as below:
: Message details
Exception: Request failed for https://api.telegram.org returned code 400. Truncated server response: {"ok":false,"error_code":400,"description":"Bad Request: chat not found"} (use muteHttpExceptions option to examine full response) (line 20, file "Code")
Hope you can advise! Thank you!
Is it possible to have google sheet that contain contact numbers and automatically adding them in telegram group?
I got this , TypeError: Cannot read property 'postData' of undefined
I would like to ask you .. I would need a python script for the Telegram bot to download the pdf files, thanks
Is this legal?
why i m not getting a message on my gmail as get?
Hi thank you
I have this error, "TypeError: Cannot read property 'postData' of undefined "
I test, logger.log(e) and it was null
but when i send hi in telegram bot, answer sent "hi mostafa undefine,thank…..comment undefined"
What should i do?
Hii.
nice tutor, but can u give a tutorial to send message to telegram bot when insert a new data on google sheet ?? thanks before
Looking for a telegram programmer to help build a bot that'll edit telegram message then forward to another group for proprietary reason. I am willing to pay for the service. Regards.
thank you ,, great tutorial
super nice, thank you!
hello brother
can it connect to any website?
I love it
How can I connect google form to telegram?