聊天紀錄至google sheet 的程式碼 function doPost ( e ) { if ( e ) { var estringa = JSON . parse ( e . postData . contents ); var d = new Date (); // var e = estringa.message.from.id; var SpreadSheet = SpreadsheetApp . openById ( "1FEN_9j410Lj-baZvnS5loZHloTMXBeJWUvSzuDTKzxU" ); //試算表ID var Sheet = SpreadSheet . getSheetByName ( "收到的訊息" ); var LastRow = Sheet . getLastRow (); Sheet . getRange ( LastRow + 1 , 1 ). setValue ( d ); // Sheet.getRange(LastRow + 1, 2).setValue(e); Sheet . getRange ( LastRow + 1 , 3 ). setValue ( estringa ); }...