Handling answers

The function we wrote in the script earlier will not be very useful if we have to run it manually (we won't be there to monitor every time someone fills a form). So, we should capture the event when someone sends a form so that we are informed by an e-mail message.

We already see the events available in the spreadsheet, so we know how it works. Just go to the Resources menu in the script editor to set up a new trigger On form submit as shown in the following screenshot:

Handling answers

Now the script will send us a message every time a form is filled. Note that the sidebar UI won't be updated since it can only work in cases where a user actually ...

Get Google Apps Script for Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.