Skip to content

Instantly share code, notes, and snippets.

@jivimberg
Created January 3, 2017 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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 = "someone@gmail.com";
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