This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkQuotaEmail () { | |
var emailQuota = MailApp.getRemainingDailyQuota(); | |
Logger.log("โควต้าอีเมลคงเหลือ:" + emailQuota); | |
MailApp.sendEmail("your@gmail.com", | |
"แจ้งโควต้าการส่งอีเมล", | |
"สิทธิ์ในการส่งอีเมลของคุณวันนี้เหลือเท่ากับจำนวน "+emailQuota +"ฉบับ"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"line": { | |
"text": "👉", | |
"quickReply": { | |
"items": [ | |
{ | |
"imageUrl": "https://www.apivat.com/line-chatbot/img-icon.png", | |
"action": { | |
"label": "ข้อมูลครู", | |
"text": "ข้อมูลครู", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"line": { | |
"contents": { | |
"body": { | |
"contents": [ | |
{ | |
"type": "button", | |
"height": "sm", | |
"color": "#e969d2", | |
"action": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ss = SpreadsheetApp.openByUrl("sheetname"); | |
var sheet = ss.getSheetByName("menu"); | |
function doPost(e) { | |
var data = JSON.parse(e.postData.contents) | |
var userMsg = data.originalDetectIntentRequest.payload.data.message.text; | |
var values = sheet.getRange(2,1, sheet.getLastRow(),sheet.getLastColumn()).getValues(); | |
for(var i = 0;i<values.length; i++){ | |
if(values[i][0] == userMsg ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ss = SpreadsheetApp.openByUrl("##"); | |
var sheet = ss.getSheetByName("แผ่น1"); | |
function doPost(e) { | |
var data = JSON.parse(e.postData.contents) | |
var userMsg = data.originalDetectIntentRequest.payload.data.message.text; | |
var values = sheet.getRange(2, 2, sheet.getLastRow(),sheet.getLastColumn()).getValues(); | |
for(var i = 0;i<values.length; i++){ | |
if(values[i][0] == userMsg ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doGet(e) { | |
return render("index"); | |
//return HtmlService.createHtmlOutputFromFile("index").setTitle('ระบบแจ้งอีเมล์โรงเรียน สพป.ชัยภูมิ เขต 1'); | |
} | |
function getCode(code) { | |
var url = "https://docs.google.com/spreadsheets/d/1fzRHrFv7PEZ86qp_KKO492hbBeliWkjVTc9OczWi9mY/edit"; | |
var ss = SpreadsheetApp.openByUrl(url); | |
var ws=ss.getSheetByName('แผ่น1') | |
var ws1=ss.getSheetByName('เมือง'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<base target="_top"> | |
<!-- Bootstrap CSS --> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> | |
<link href='https://fonts.googleapis.com/css?family=Sarabun' rel='stylesheet' type='text/css'> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ss = SpreadsheetApp.getActiveSpreadsheet() | |
var sheet = ss.getSheetByName("แผ่น1"); | |
function doPost(e) { | |
var data = JSON.parse(e.postData.contents) | |
var userMsg = data.originalDetectIntentRequest.payload.data.message.text; | |
var values = sheet.getDataRange().getDisplayValues() | |
let result = { | |
"fulfillmentMessages": [ | |
{ | |
"platform": "line", |
OlderNewer