• Got Sheet
  • Posts
  • The Beginner’s Guide to Google Apps Script

The Beginner’s Guide to Google Apps Script

Way more powerful (and easier) than you think

Early Access Apps Script Course

I’m building a project-based course about using Apps Script in 2025. Sign up for early access:

Do You Want a Dedicated Beginner's Course for Apps Script?

Click Yes and I'll add you to early access.

Login or Subscribe to participate in polls.

OVERVIEW

What I’ll cover in this article:

  1. Overview of Apps Script

  2. How to get started with Apps Script

  3. Do you have to know how to code to use Apps Script?

RESOURCES

Some tools to make life easier. You’re welcome :)

  • beehiiv - my choice for a newsletter operating system

  • Coefficient - Live connections to 60+ business systems

  • Lido - Automate your spreadsheets; accurately extract date from PDFs

  • TransactionPro - quickly import, export or delete data in Quickbooks

  • Perspective - Build high-converting lead funnel microsites

  • Gamma - AI designer for presentations, websites, social posts, and more

  • Gratitude Plus - social gratitude journal

  • Senja - collect and display testimonials

  • OpusClip - turn long videos into short clips

  • Carrd - free one-page website builder

  • Notion - notetaking + project management + database

  • Transistor - my favorite podcast host

  • Fathom - AI-powered notetaking app

MAIN ARTICLE

Overview of Apps Script

Apps Script lets me (not a developer) write code behind the scenes in Google Sheets and other Google applications to automate and perform tasks that are beyond the capabilities of built-in functions.

It’s more than that. But that’s the primary reason I got into it.

Without knowing how to code, I have been able to piece together and learn bits of code to solve business problems without having to hire out expensive developers.

What Apps Script Is Not

Let’s touch on what Apps Script is not.

  • It’s not impossible.

  • It’s not only for developers.

  • It’s also not easy to start without a guide.

That last point is why I make tutorials here and on YouTube.

I vividly remember sitting in a cold computer lab at Millsaps College sometime in 2010 and firing up Excel in an Operations Management course.

I didn’t know what the course was about. I didn’t realize it was Excel based. I didn’t realize how little I knew about spreadsheets.

I knew my way around them, but I had no idea of their capabilities. It was eye-opening and a very fun learning experience.

Similarly, a couple years after that at a new role at work, I had the opportunity to improve some of our inventory and ordering systems. We weren’t spending money on bespoke software, so I began digging deeper into Google Sheets and Apps Scripts.

what is google apps script?

I love learning how to do things with technology, but I also know it’s very hard and intimidating for a lot of people. It helped me a ton to take courses and learn from professionals.

I want to give back to the next generation of future spreadsheet enthusiasts!

Apps Script Automates and Extends Google Workspace

Ok, back to Apps Script.

At its core, Apps Script allows us to expand on the capabilities of Google Workspace products.

For my purposes, I use it a lot in Google Sheets. But it’s compatible with all of Google Workspace products from Gmail to Docs to Meet to Slides and many more applications you may not even know about.

Here’s the full list of Google Workspace Services that can be used either through APIs or with simple code inside of Google Workspace Apps:

  1. Admin console

  2. Calendar

  3. Chat

  4. Docs

  5. Drive

  6. Forms

  7. Gmail

  8. Sheets

  9. Slides

  10. Workspace

  11. Classroom

  12. Groups

  13. People

  14. Tasks

How Does Apps Script Actually Work?

Let’s start small. Open a new Google Sheet. Up in the menu bar is an option called Extensions. Click that, and then click Apps Script from the dropdown menu.

selecting apps script from a google sheet

This opens a new window for a new, as yet untitled, Apps Script project.

a blank apps script project

This is where you can write (or copy and paste) code to run inside your spreadsheet.

It can get really complicated. If you’re a non-technical person, you will want to close the window and run back to LinkedIn.

Fear not.

I was scared in the beginning too.

Here’s what you need to know. I can’t stress this enough.

You do not have to learn how to code before you start using Apps Script.

If you have a business problem, a drain on your time in Google Sheets (or another app), if you need to connect Google Apps together or cause something to happen in one after you do something in another, if you suspect that you have inefficiencies that could be solved with automating something in your workflow…that’s all you need to get started.

Apps Script gives us a ton of built-in methods and pieces of code that we can learn how to piece together.

What are Spreadsheet Services?

We’re using Google Sheets so we won’t try and connect other services right now. Let’s head over here to the Spreadsheet Service page in the documentation for Apps Script.

What we see here is an admittedly overwhelmingly large list of things including:

  1. Classes

  2. Methods

Classes represent things we interact with like Spreadsheets, Colors, Named Ranges, Filters, etc.

Methods represent actions we can do in our spreadsheet.

The main class that I want to highlight is the SpreadsheetApp class. This is the gateway into your active spreadsheet.

Within this class there are properties (don’t worry about them for now) and methods (the stuff we can work with).

A Simple Apps Script Example

This is one of the first things I used Apps Script for: clearing data ranges.

Seriously.

Now I needed a lot of ranges cleared so it was a bit more complicated than what we’ll do, but the principle remains the same.

That’s the beauty with learning a little bit of these tools - once you know the basics, you can expand it into bigger use cases with minimal effort.

Let’s write a quick function.

What’s a Function?

What’s a function? Glad you asked. A function is a piece of code that will execute when we tell it to.

A basic setup looks like this: click a button → run a function → something happens.

In our case: click a button → function runs → range is cleared in spreadsheet.

One of the reasons I like Google Sheets and Google Apps Script so much is that as soon as we start typing anything, a very helpful, very detailed tooltip box pops up.

I can’t tell you how many times I’ve just used this to find the methods I need without having to Google or go to the documentation pages for help.

popup tooltip for apps script

Our function will look like this:

function clearRange(){
SpreadsheetApp.getActive().getRangeByName('sample').clearContent()
}

Now you can copy and paste this and it’ll work fine. However, I recommend you type it out this first time so you can see how the pieces start fitting together.

Function names are always defined by typing function functionName.

Don’t be scared of the parentheses and curly braces. If we needed to give the function additional information, we’d put it in the parentheses and the curly braces simply denote the beginning and the end of the instructions for the function.

Apps Script is pretty good at having descriptive method names. You can read this line of code and pretty much understand what it’s going to do.

  1. It selects the current spreadsheet: SpreadsheetApp.GetActive()

  2. It selects the range ‘sample’ within that spreadsheet: getRangeByName(‘sample’)

  3. It clears the content in that range: clearContent().

Very basic. Very readable. Very doable for the beginner.

How to Run an Apps Script Project

To run this, make sure to save it by pressing CTRL + S or clicking the disc icon in the menu bar. Then click the Run button in the menu.

save and run in apps script

This will only work if we have a named range of sample in our spreadsheet so let’s set that up, put in some data and then run this and watch it be cleared.

sample data in Google Sheets

How to Run Apps Script with a Button

It’s a lot more fun to have a button to press, though.

Save your Apps Script and close that window.

Head over to the spreadsheet and select Insert → Drawing.

Make a shape and type in CLEAR.

Resize appropriately and then click the three dots in the top right of the drawing to select Assign script .

assign script to button in Google Sheets

Type in the name of the function. In our sample, this would be clearRange. Note that you don’t need the parentheses here, just the name. It is case sensitive though, so type it in exactly as it appears in the apps script.

Now, when you click the button, it will run the script and clear that range.

running a script in Google Sheets

Going Further with Apps Script

If you want more, I’m developing a beginner’s Apps Script Course. Sign up for early access at the top of this post 👆

Want to Work with Me?

Need personalized help? Reply to this email or grab a slot on my calendar here.

NEXT STEPS

Whenever you’re ready, here’s how I can help:

  1. Work with me

    I am available for consulting projects. Reach out and let’s chat.

  2. Business tech stack (FREE)
    My recommendations for software and tools I use to create content and run my online business.

  3. Sponsor Got Sheet
    Got Sheet teaches business operators, teachers and entrepreneurs how to get good at spreadsheets. Interested in sponsoring an issue or a series of Got Sheet newsletters? Reach out to get more information.

  4. Personal budget tool
    As a Got Sheet subscriber, I want you to have a 50% discount on the personal finance system I update every year.

  5. YouTube

    If you aren’t subscribed yet, come on over to my YouTube channel where I make all my spreadsheet, coding and productivity tutorials

HAPPY SPREADSHEETING!

Enjoyed this issue?
Subscribe below or Leave a testimonial

Cheers, Eamonn
Connect on LinkedIn, YouTube & Twitter.

Reply

or to participate.