coderbunker / gas

G-Suite Google Apps Script (GAS) used with Coderbunker documents
3 stars 0 forks source link

Fix the problem of multiple trigger activation when a new form record comes in #71

Closed andiechu closed 5 years ago

andiechu commented 5 years ago

See issue https://github.com/coderbunker/gas/issues/70

I checked with my logic and onboarding Email cannot be sent when there's a sending record. I think it's because the trigger activation in less than 1 second, within which time the first Email hasn't finished sending yet. So the email sending will trigger several times until the first Email sending procedure finished and a record of "Email Sent" was added.

rngadam commented 5 years ago

https://developers.google.com/apps-script/reference/lock/

...and at the very least insert a value before sending email