How to Use doGet(e) Function to Start HTML Google Web App
Sat Feb 18 2023 16:06:24 GMT+0000 (Coordinated Universal Time)
Saved by
@jasonuk
#javascript
Google Apps Script Code Used in Video Below:
function doGet(e) {
Logger.log(JSON.stringify(e));
Logger.log(e.parameter['message']);
return HtmlService.createHtmlOutputFromFile('ExampleFile1');
}
//function doGet(e)
//{
// Logger.log(JSON.stringify(e));
// Logger.log(e.parameter['message']);
// var htmlOutput = HtmlService.createTemplateFromFile('ExampleFile2');
// htmlOutput.message = e.parameter['message'];
// return htmlOutput.evaluate();
//}
//function doGet(e)
//{
// Logger.log(JSON.stringify(e));
// var htmlOutput = HtmlService.createTemplateFromFile('ExampleFile3');
// if(!e.parameter['username'])
// {
// htmlOutput.username = '';
// }
// else
// {
// htmlOutput.username = 'Username is: ' + e.parameter['username'];
// }
// htmlOutput.url = getUrl();
// return htmlOutput.evaluate();
//}
//
//
//function getUrl() {
// var url = ScriptApp.getService().getUrl();
// return url;
//}
content_copyCOPY
https://codewithcurt.com/how-to-use-dogete-function-to-start-html-google-web-app/
Comments