Execute as: Me, Who has access: Anyone。网络应用程序
function doPost(e) {
  myLog('Received from Addon: ' + JSON.stringify(e));
  // console.log('parameters from caller ' + JSON.stringify(e));
  return ContentService.createTextOutput(JSON.stringify(e));
}
Run Code Online (Sandbox Code Playgroud)
Webhook aTelegram-bot 和此 Web 应用程序已设置。
添加在
function sendPost() {
  var sheetURL = SpreadsheetApp.getActiveSpreadsheet().getUrl();
  // var webAppUrl = "https://script.google.com/macros/s/#####/exec"; // 7: Part_1 - WebApp: My
  var webAppUrl = "https://script.google.com/macros/s/###/exec"; // 7: Part_1 - WebApp: Tester
  // var auth = ScriptApp.getOAuthToken();
  // var header = { 'Authorization': 'Bearer …Run Code Online (Sandbox Code Playgroud) web-applications add-on google-apps-script http-status-code-302 telegram-bot