'my GAS is not recording text into my spread sheet with the append row function i have ran through most of the format nothing seems wrong
var token = "token" ;
var telegramUrl = "https://api.telegram.org/bot" + token ;
var webAppUrl = "weburl" ;
function setWebhook() {
var url = telegramUrl + "/setWebhook?url=" + webAppUrl;
var response = UrlFetchApp.fetch(url);
}
function sendMessage(chat_id, text) {
var url = telegramUrl + "/sendMessage?chat_id=" + id + "&text="+ text;
var response = UrlFetchApp.fetch(url);
}
function doPost(e) {
var contents = JSON.parse(e.postData.contents);
var id = contents.message.from.id;
var text = contents.message.text;
sendMessage(id,"Message Received")
var ssId = "id" ;
var sheet = SpreadsheetApp.openById(ssId).getSheetByName("Sheet1");
var dateNow = new Date;
sheet.appendRow([text]);
}
i m new to GAS however i have been stuck here for a few hours i cant seem to get the text that i have sent my telegram bbot to be recorded in the spread sheet i m a beginner so help me if possible thank you
Context i am trying to get my telegram bot to update whatever messages i have sent it into a google spread sheet
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
