function onInstall(e) {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName('Form');
var Timestamp = e.values[0];
var Load = e.values[1];
var Email = e.values[2];
var Location = e.values[3];
var template = HtmlService.createHtmlOutputFromFile("notification");
template.Location = Location;
MailApp.sendEmail(Email, "subject", "", {
HtmlBody: template.evaluate().getContent()
});
}
I have written this small program. Everytime user edit spreadsheet. It should run trigger and shoot an email to mentioned email address in column. I am not good in coding. But Please help me solving this, I have been trying from so long.
Here is link to public spreadsheet Spreadsheet
function() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetName('Form');
}
function onEdit(e) {
var Timestamp = e.values[0];
var Load = e.values[1];
var Email = e.values[2];
var Location = e.values[3];
MailApp.sendEmail(Email, "check In Call", "location");
}