The Ultimate Manual to Learning Google Scripting
If you’re wondering how to learn Google scripting and use it to perform various tasks in Google Workspace, this article has lots of great information for you.
Google Scripts (also known as Google Apps Script) is an application development platform that allows you to create business applications using Javascript. Using this platform, you can enhance your Google Workspace features and perform several unique tasks that are unavailable to regular users.
In this article, we’ll give you an introduction to Google Scripting and how you can get started with it.
Let’s dive in.
What is Google Scripting Anyway?
Google scripting is the process of using Google Apps Script to create scalable web applications that easily integrate with various Google services like Gmail, Drive, Calendar, Sheets, etc.
Google Apps Script platform is designed for developers looking to create new functions or add new options to their Google Workspace applications. Google Apps Script allows you to create applications using Javascript in your web browser environment.
You don’t need to install or download any additional software. Instead, you can start Google scripting by simply signing in to the Google Apps Script platform.
Although you need development and coding knowledge to use Google Scripts, you can also use its vast script libraries for various Google Workspace applications.
So what exactly can you do with Google scripting?
Google Scripts are primarily meant to create custom experiences in Google Workspace applications and extend the functions of the various Google applications. You can use them to develop cross-application experiences, call various Google services from other applications, and create reusable scripts or templates for specific apps or the Google Workspace ecosystem generally.
Some of the main tasks you can perform using Google Scripts include.
- Create custom menus or add new dialogs and sidebars to Google Docs, Sheets, and Forms.
- Create new functions, formulae, and macros in Google Sheets to improve user experience and add custom options according to your business needs.
- Publish standalone or embedded web apps in Google Sites.
- Create apps that interact with other Google services, including AdSense, Analytics, Calendar, Drive, Gmail, and Maps, and enable cross-app functions by defining the necessary user permissions.
- Create add-ons to extend Google Docs, Sheets, Slides, and Forms, and publish them to the Add-on store for public access.
- Convert an Android app into an Android add-on to exchange data with a user’s Google Doc or Sheet on a mobile device.
- Streamline Google Chat workflows by building a chatbot.
As you can see, Google Scripts open up numerous possibilities and ways you can enhance the utility of your Google Workspace applications.
However, before you can do that, you must fully understand Google Scripts, its types, and what it offers.
Types Of Google Scripts
There are three main types of Google Scripts based on their utility and how they interact with the Google Workspace ecosystem.
Let’s understand them one by one.
Standalone scripts are plug & play scripts within Google Workspace that are not bound to any specific Google application like Sheets, Docs, Forms, or Sites. As a result, you can integrate standalone scripts with any Workspace application as needed.
These scripts appear independently among your Google Drive files and can be used for a variety of purposes.
For example, you can use standalone scripts as web apps, copy a standalone script to create a bound script (which we’ll explain shortly), or even publish add-ons from standalone scripts.
You can create standalone scripts using the web editor in scripts.google.com.
Bound scripts are explicitly created for a file in Google Sheets, Docs, Slides, or Forms. They’re structured exactly like standalone scripts but are only available for the documents/file they’re bound to.
For example, if you create a bound script for the file XYZ in Google Docs, you cannot access it in the file ABC in Google Docs. This is the reason bound scripts are not visible in your Google Drive files like regular standalone scripts.
To create bound scripts, you need to open the relevant file for which you want to create the script. Then access its script editor from the Tools menu to create the script. Since bound scripts are not visible in your Google Drive files, you’ll need to access your past scripts for a specific document from its script editor.
Bound scripts have several privileges over standalone scripts. For example, you can use them to create custom functions in Google Sheets (similar to the standard functions like SUM or AVERAGE).
Similarly, you can use bound scripts to create unique and interactive dialogue boxes and messages in Google Sheets.
Only the users who have permission to edit a file can run its bound scripts. Collaborators with view-only access rights cannot access the script editor for that file or run the script.
Finally, web apps are scripts with a user interface. They can be created using standalone and bound scripts. For example, a script that allows users to generate support tickets can be easily converted into a web application that users can access from their browsers.
How Learning Google Scripting Works
If you’re looking to learn Google Scripting, you first need to understand its pre-requisites, primary and secondary modules, and the necessary apps.
You can create Google Scripts using its script editor inside your web browser. However, to do that, you must have at least a basic understanding of the following.
Javascript: Google Scripting is based on Javascript, one of the world’s most popular and widely used programming languages for interactive web browser experiences.
To create, edit, and work with Google Scripts, you don’t need to be an expert in Javascript. But you still need to have at least a fundamental understanding of this programming language.
So if you’re completely new to Javascript, you must familiarize yourself with it before beginning Google Scripting.
Google Sheets: Some of the most valuable and innovative ways to utilize Google Scripts require at least a basic understanding of Google Sheets. As a Google Sheets user, you can use scripts to create custom menus, dialogues, and sidebars to uniquely interact with users. Similarly, you can create custom formulae to process your data in Google Sheets in unique ways. To do all of that, you must understand how Google Sheets works.
Google Sheets API: The Google Sheets API is a RESTful interface that lets you read and modify a spreadsheet’s data. The most common uses of this API include creating spreadsheets, reading and writing spreadsheet cell values, updating spreadsheet formatting, and managing connected sheets. You need to have a basic understanding of Google Sheets API to start learning Google Scripting.
How do you learn these things if you’re a complete beginner? There are numerous online tutorials and resources to learn Javascript, Google Sheets, and Google Sheets API.
You can start with Google’s help documentation to understand Google Sheets and its associated functions. Then, for Google Sheets API, you can see the detailed documentation on Google’s developer forum.
For Javascript, Google recommends Codeacademy’s Javascript courses that cover everything from its basics to advanced levels.
Once you gain a beginner-intermediate level understanding of these core topics, you can move towards the specific components and functions of Google Scripting.
For example, you could start by learning macros and custom functions in Google Sheets, using Google App Scripts to work with data and formatting in Sheets, and presenting data in slides.
Then you can move to other topics such as creating custom menus and functions in Google Sheets and managing Google Forms responses, building add-ons, and setting up web apps using Google Scripts.
How to Get Started With Learning Google Scripting
Learning Google Scripting from scratch takes time because it requires understanding several technical functions, applications, and programming languages.
However, it’s not as difficult as you think.
By diving into Google’s recommended help resources and using the available online content, you can become a competent Google Script user in a few months.
Here are some of the steps to learn Google Scripting.
Step 1: Get Familiar With The Google Scripting Platform
Before diving into any resources for learning how Google Scripts work, we recommend getting yourself familiar with the Google Scripts platform first.
To access the Google Scripts platform, sign in to your Google account (create one here if you don’t already have it) and visit https://script.google.com/.
Once inside, start exploring its script editor, triggers, and the general account settings. You can do that by creating a new script or trigger.
At this point, you won’t be able to do much, but it’s essential to get a feel of the platform to get back to it once you have the necessary skills.
Step 2: Evaluate Your Current Expertise Level
We’ve already discussed the pre-requisite skills and expertise for using Google Scripts. So before starting to learn Google Scripts, evaluate your existing knowledge in Javascript, Google Sheets, and Google Sheets API.
If you’re a complete beginner, you’ll need to follow the whole learning track that Google Scripts recommends. This includes learning Javascript on Codeacademy or any other reliable learning platform. Plus, you’ll have to get familiar with Google Sheets, its functions, options, and APIs before you can start building Google scripts, web apps, or add-ons.
However, if you have experience in Javascript, learning Google Sheets and APIs shouldn’t take you long.
Step 3: Watch Google’s Recommended Tutorials
Google Scripts has a lessons playlist designed for complete beginners in Google Scripts. However, as we’ve mentioned before, the playlist assumes you have understood Javascript and have used Google Sheets before.
Google Scripts playlist is an entire program that teaches you various scripting functions through expert tutorials. It includes five video and text tutorials, along with several examples, on the following topics.
- Fundamentals of Apps Script with Google Sheets #1: Macros & Custom Functions
- Fundamentals of Apps Script with Google Sheets #2: Spreadsheets, Sheets, and Ranges
- Fundamentals of Apps Script with Google Sheets #3: Working with Data
- Fundamentals of Apps Script with Google Sheets #4: Data Formatting
- Fundamentals of Apps Script with Google Sheets #5: Chart and Present Data in Slides
Each tutorial consists of multiple lessons along with examples, illustrations, and practical exercises. On average, it should take you around 30 minutes to complete each tutorial. But once you complete it, you should be able to confidently use Google Scripts.
Step 4: Dive Into Additional Resources For More Insights
The tutorial we discussed in the previous point should equip you with the necessary insights to use Google Scripts efficiently.
But if you want to become an advanced user and learn more about Google Scripts, it offers several additional resources that you can use.
For example, you can dive into Google Developer documentation to learn about custom menus and functions in Google Sheets. Similarly, you can learn how to build add-ons and web apps or review additional documentation about Google Script services and concepts.
All of this is available in Google Developers help documentation.
Step 5: Apply What You Learn
The most critical step in learning Google Scripts is putting your theoretical knowledge into action. Without practicing the concepts you’ve learned, you won’t fully master them and might have problems applying them to unique scenarios.
Where do you practice these concepts?
In your Google Scripts script editor. There’s no limit to the number of scripts you can create there. So every time you learn something new about Google Scripts, head over to the script editor and put it into action.
This way, you will keep improving as a Google script builder.