Created
June 25, 2021 06:04
-
-
Save chirag-jn/52658102c647147700af6c9cad272b49 to your computer and use it in GitHub Desktop.
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 dumpEditResponseUrlsForYourForm() { | |
// Change this next line to use the id of your form | |
var myFormId = "id"; | |
var form = FormApp.openById(myFormId); | |
var formResponses = form.getResponses(); | |
for (var i = 0; i < formResponses.length; i++) { | |
var formResponse = formResponses[i]; | |
var string = ""; | |
if(formResponse.getRespondentEmail().length > 0) { | |
string = string + "Email: "; | |
string = string + formResponse.getRespondentEmail(); | |
string = string + "<br>"; | |
string = string + "Time: "; | |
string = string + formResponse.getTimestamp(); | |
string = string + "<br>"; | |
string = string + "Edit Link: "; | |
string = string + formResponse.getEditResponseUrl(); | |
string = string + "<br>"; | |
MailApp.sendEmail({ | |
to: formResponse.getRespondentEmail(), | |
subject: "My Awesome Subject", | |
htmlBody: string | |
}) | |
Logger.log((i+1) + ' out of ' + formResponses.length + ' done'); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can run this script at https://script.google.com/