Intro to Google App Scripts

In this blog post I will be showcasing the power and convenience of Google App Scripts. In my previous role, as a Digital Marketing Analyst almost every day I had a new problem to solve, whether that be sorting, cleaning, or transforming data. These tasks were often very repetitive and for lack of a better term; boring. Coming from a software development background, my first instinct was how can I automate this?

Welcome to Google App Scripts. Google App Scripts is a light weight scripting framework built into all main Google products (Docs, Slides, Sheets etc). App Scripts is based on JavaScript (version 1.6 + a few extras), which means with very little programming experience anyone can be on their way to automating boring tasks.

Here is a good resource for those of you who would like to learn a bit about JavaScript_Note: Those familiar with Microsoft, may be aware of a similar feature in Excel; VBA scripting (Something I have no experience with, and unable to comment on similarities)._Now lets get into it!Prerequisites:

  • Google Account
  • Google Drive Access
  • Google Sheets

Step 1. Google Sheet

As most data handling is done in a Spreadsheet, this will be the focus of our tutorial. Create a new Google Sheet

Step 2. Test Data

Basic Data, as tax time has just past lets work out some GST (For those of you not in Australia, GST is a Goods and Services Tax on all products sold in Australia)

Step 3. Accessing Google Script Editor

Step 4. Create custom function

Creating our function, which has an input and return value. This function basically just adds 10% of the initial input product price to the product price and returns the new GST inclusive product price.

Step 5. Calling our function in the Google Sheet

Step 6. Error handling

So there you have it, a basic introduction of how to create your own custom functions in Google App Scripts! While I didn’t go into much depth as to what you can automate, I still hope this has given you a rough idea of the possibilities that Google App Scripts provides.

If you have any comments or ideas for future tutorials, feel free to connect with me on LinkedIn!