Reputation: 135
Are there any possibilities that I can control how long it takes after a form has been submitted before it will send an email out?
Currently, my code is working with a onFormSubmit
function. So whenever a form is submitted and I have google script that has IF statements
which checks for a range of values.
I want to improve the code but I can't think of any for the past few days. My plan is to send an email lets say, 10 minutes after the form is submitted. Let say, the form submitted has typos in it and one of the values isn't supposed to trigger an email send but instead it does due to the typo.
So now, I want to edit that value to the correct value which is within the accepted range. If this is being edited within that 10 minutes and is being checked again that it is actually within the range, then the email will not be sent. Is there any way this can be done? I have read up a bit about the function onEdit but it does not really cater for my requirements.
Upvotes: 0
Views: 78
Reputation: 26816
onFormSubmit
run a Clock trigger builder that will, lets say after the chosen amount of time run a function. Within this function you can verify if an edit to the form has taken place (retrieve the form submit data from the destination spreadsheet) and send an email if required.
Upvotes: 1