Created
January 3, 2017 07:18
-
-
Save jivimberg/8cae46cdb5b98c0d19176efcde2eadd9 to your computer and use it in GitHub Desktop.
Email Google Form daily full script
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 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