Google Apps Script Tutorial for Beginners
This tutorial also comes in video form, where basic programming concepts like variables, objects, etc. are explained. Go ahead and check it out.
Google Apps Script Tutorial - Where to get started
Look at most of the Google Apps and you’ll find your way to the script editor. In our tutorial we’re automating the formatting of a Google Sheets document. That’s why we access the script editor, where we will be writing our automation script, through Tools > Script editor in Google Sheets.
What you see now is the script editor with a placeholder function by the name myFunction. You can delete this function and start writing your own.
Go ahead and copy the provided code to your script editor. You’ll see the orange comments that explain what is actually done with the provided code.
Before you leave the script editor be sure to save your automation script by clicking on the Save icon and giving it a name. In our tutorial we named our script Report Formatting.
Running the automation script
To actually run our automation script so that it formats our report, we head back to our Google Sheet document.
Reload the document in your browser and after about 15 seconds our Custom Formatting appears in the menu list. That menu was created by the second function in our script we created.
You will be asked to grant your script the rights to access your account. Confirm this. Then it might be necessary to click again on Custom Formatting > Format Report.
After about 5 seconds your report should look something like this.