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 myFunction() { | |
var calenda = CalendarApp.getCalendarById("xxx"); | |
var token = "xxx"; // Line Token | |
var url = "https://notify-api.line.me/api/notify"; | |
var today = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()); | |
var event = calenda.getEventsForDay(today); | |
var msg = ""; | |
if (event.length === 0) { | |
msg = "วันนี้ไม่มีกิจกรรม"; |
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() { | |
return HtmlService.createTemplateFromFile('555') | |
.evaluate() | |
.addMetaTag('viewport', 'width=device-width, initial-scale=1') | |
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL) | |
} | |
function submitData(obj){ | |
var ss = SpreadsheetApp.openById("xxx"); | |
var sheet = ss.getSheetByName("xxx"); | |
var flag = 1 ; |
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> | |
<head> | |
<base target="_top"> | |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> | |
<style> | |
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@400&display=swap'); | |
*{font-family: 'Prompt'} | |
#frame { | |
height: 400px; |
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() { | |
return HtmlService.createTemplateFromFile('index') | |
.evaluate() | |
.addMetaTag('viewport', 'width=device-width, initial-scale=1') | |
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL) | |
} |
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() { | |
return HtmlService.createTemplateFromFile('index').evaluate() | |
.addMetaTag('viewport', 'width=device-width, initial-scale=1') | |
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL) | |
} | |
function saveData(obj){ | |
var ss = SpreadsheetApp.openById('xxx').getSheetByName('ชีต1') | |
var header = ss.getRange(1,1,1,ss.getLastColumn()).getValues()[0] | |
var row = [] |
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() { | |
return HtmlService.createTemplateFromFile('index') | |
.evaluate() | |
.addMetaTag('viewport', 'width=device-width, initial-scale=1') | |
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL) | |
} | |
function sendMail(obj) { | |
Logger.log(obj) | |
var message = obj.message | |
var email = obj.email |
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.openById('xxx') | |
function doGet(e) { | |
return HtmlService.createTemplateFromFile("index").evaluate() | |
.setTitle("WebApp Form Toggle-Show-Hide Password") | |
.addMetaTag('viewport', 'width=device-width, initial-scale=1') | |
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL); | |
} | |
function saveData(obj) { |
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() { | |
return HtmlService.createTemplateFromFile('55') | |
.evaluate() | |
.addMetaTag('viewport', 'width=device-width, initial-scale=1') | |
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL) | |
} | |
function saveData(obj) { | |
let ss = SpreadsheetApp.getActive().getSheets()[0] | |
let header = ss.getRange(1, 1, 1, ss.getLastColumn()).getValues()[0] | |
let newrow = [] |
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) { | |
var htmlOutput = HtmlService.createTemplateFromFile('index'); | |
var courses = getCourses() | |
htmlOutput.message = '' | |
htmlOutput.courses = courses | |
return htmlOutput.evaluate() | |
} | |
function doPost(e) { | |
var name = e.parameters.name.toString(); | |
var courses = e.parameters.courses.toString(); |
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
try { | |
var folder = DriveApp.getFolderById('xxx');//ไอดีโฟลเดอร์ | |
var date = Utilities.formatDate(new Date(),'GMT+7','dd/MM/yyyy') | |
var contentType = data.substring(5, data.indexOf(';')), | |
bytes = Utilities.base64Decode(data.substr(data.indexOf('base64,') + 7)), | |
blob = Utilities.newBlob(bytes, contentType, file), | |
file = folder.createFolder([name,date].join(" ")).createFile(blob), | |
filelink = file.getUrl(); | |
var lock = LockService.getPublicLock(); | |
lock.waitLock(30000); |