Currently we have a Google Form that is automatically uploaded and batched in installments of ~50 forms. These come into a spreadsheet and need to be acted upon by a trigger that subscribes to the onFormSubmit event.
The problem is that since these are all uploaded simultaneously, the event fires rapidly back to back and come up with the either of the following warnings:
Too many simultaneous invocations: Spreadsheets (line 16, file "Code")
We're sorry, a server error occurred. Please wait a bit and try again. (line 12, file "Code")
According to the Daily Quotas Limit, there's a max of 20 scripted triggers per day.
That's a perfectly reasonable number, so long as I can find a way to run a single trigger for all 50 back to back form submissions at the very end.
It would be great if I could set a timeout for the execution to wait and see if any other events were fired in the next couple seconds, but I would need to be inside of a trigger handler by the time I'm executing the trigger.
Q: Is there anyway to batch Form Submission Triggers?