Hi Group,
I occasionally use a little bit of Apps script in my work. I am in no way an expert - definitely a beginner coder and I copy and edit a lot of script.
I've used this script in a Google Form to close when a limit of 10 submissions is reached.
I'd also like it to trigger an email to 3 email addresses when this happens so they can get the data, do stuff and then reset the form for the next month. How do i go about adding the code to notify when the limit is reached?
The trigger is set to Form Submit
Thanks in advance!
//
function CloseFormWhenFull() {
let maximum = 10;
let form = FormApp.getActiveForm();
let responses = form.getResponses();
let count = responses.length;
//Logger.log(count);
if (count === maximum){
form.setAcceptingResponses(false);
}
}
//