Setting up Triggers in Google Apps for Debugging

In my previous article I wrote about setting up a workflow for users to enter data into a Google form and the information is merged into a document and a PDF is created. You can read that article here. When you are trying to diagnose issues triggers with notifications can really help your debugging problems. Lets take a look at setting up triggers in Google Apps scripting.

We are going to pickup in our script editor in Google apps (Spreadsheet – Tools – Script editor)

 

 

Here you should see your code displayed for your different functions:

To setup our trigger click Resources, Current Scripts Triggers.

 

 

A popup should come up that looks like this:

Click to add a new trigger. The options are very simple, especially for what we want to do. In your code you have to link the code to the form and this is where you do that. In the image below you can see we are running our function when the form is submitted. To receive an email click the notifications button at the end.

¬†When you click “notifications” you should see another popup that allows you to select immediately . This allows you to get your debug information immediately.

 

Now that notifications are setup you will get emails that look like this:

 

 

When there are issues.

 

If you have questions comment below or email me at TJ at TJhouston.com

 

 

Thanks