Skip to content

Instantly share code, notes, and snippets.

@jivimberg
Created January 3, 2017 07:18
Show Gist options
  • Save jivimberg/8cae46cdb5b98c0d19176efcde2eadd9 to your computer and use it in GitHub Desktop.
Save jivimberg/8cae46cdb5b98c0d19176efcde2eadd9 to your computer and use it in GitHub Desktop.
Email Google Form daily full script
function sendFormEmail() {
var toEmailAddress = "[email protected]";
var htmlMessage = HtmlService.createHtmlOutputFromFile("Name-of-your-HTML-file.html").getContent();
var subject = "Subject";
var message = "Some message";
MailApp.sendEmail(toEmailAddress, subject, message, {
htmlBody: htmlMessage
});
}
function createTimeDrivenTriggers() {
// Trigger every day at 6 pm.
ScriptApp.newTrigger('sendFormEmail')
.timeBased()
.atHour(18)
.everyDays(1) // Frequency is required if you are using atHour() or nearMinute()
.create();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment