Tuesday, 25 December 2018

Email on Form submit

The following Google Apps Script code was developed for the Library to better handle postal refund forms - in the way that staff were alerted to their submission. The code is embedded in the response sheet of the form and has a project trigger to run the onFormSubmit function, of the event type - On form submit.

It gets the form data and assigns each value to a variable by specifying the column heading, it then structures an email body containing these fields along with some descriptive text (plain-text format). Using the 'MailApp' this email would be sent to a delegated mailbox that multiple staff have access to. The final part of the script then writes a value to the 'Email Alert Sent' column as a record of the action successfully completing.

Download
Email on Form submit download here (please use 'File' > 'Make a copy' for your own version).

No comments:

Post a Comment