const botToken = “123456789:aabbccddeeffgghhii”

const chat_id = “987654321”

const telegramUrl = “https://api.telegram.org/bot” + botToken;

function hello({  

sendText(chat_id,”Test!”)

}

function sendText(id,text) { 

 let url = telegramUrl + “/sendMessage?chat_id=” + id + “&text=” + text;  

Logger.log(url);  

let response = UrlFetchApp.fetch(url);  

Logger.log(response.getContentText());

}

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。