Running Google Apps Script for the First Time: What’s with all the Warnings!

Running Google Apps Script for the first time

Google Apps Script

You’ve probably landed on this page because, like most of us, the first time we ran a Google Apps Script we came across a gauntlet of ever-increasing warnings asking us if we truly want to run this script. That’s cool. This is just Google trying to protect users.

Unfortunately, it does make things a little confusing for the first time Google Apps Script coder.

So what’s happening?

When we run a Google Apps Script code it often needs access to read, edit or write in certain locations, like your Google Drive, Google Sheets, Google Docs, etc. Each action that impacts you the user requires certain levels of authorisation from you to access it.

Because giving this authorisation to your code can make changes to your Google environment, Google provides a slew of warnings to ensure you are confident in what you are doing.

Sure, this is annoying for the regular Google Apps Script developer, but it is an important protection for the everyday user.

Check out the video below for a walkthrough on how to run complete the authorisation process and run your code for the first time:

Authorisation Steps

So the basic steps are as follows:

The first time you run some code you will get a list of warnings and popup like this. This app isn't verified Google Apps Script

First, click on advanced. The window will expand.

Google Apps Script Click Advanced Got To unsafe

Then click Go to NAME OF PROJECT (Unsafe). This will open a new window with a list of all the things the code will access and provide authorisation for the script to use.

OAuth permissions Allow Google Apps Script

Hit Allow. 

If you are running your script for the first time through a Menu item or Google Sheets button, you may have to go in and click the menu item again to run the code the first time.

Create and Publish Google Workspace Add-ons with Apps Script Course 300px

This authorization process will only run once for your script unless you make changes that require changes to the scope (areas of access) of the script.

A Warning

Google has created this warning process for authorisation of scripts for good reason. It does not want you to fall victim to nefarious practices like data theft or deletion.

If you are running code you created on your own, no worries. You know what you wrote and it will be fine. However, if you are copying someone elses code for a project ensure you trust the author or read through the code to check it does what it says it does.

Most tutorial sites are fine and copying code from my tutorial or the sites I recommend in my Google Apps Script page won’t be a problem.  And of course, the practice is not that rampant so don’t be so paranoid that you give up. Just be wary.

Create and Publish a Google Workspace Add-on with Apps Script Course

Need help with Google Workspace development?

My team of experts can help you with all of your needs, from custom app development to integrations and security. We have a proven track record of success in helping businesses of all sizes get the most out of Google Workspace.

Schedule a free consultation today to discuss your needs and get started or learn more about our services here.

?You can support me for free by using this Amazon affiliate link in your next tech purchase :Computers & Stuff! ?

2 thoughts on “Running Google Apps Script for the First Time: What’s with all the Warnings!”

Leave a Reply