fx Getting Started

What is Apps Script and when to use it

⏱ 10 min

What you'll learn

  • What Google Apps Script is and where it runs
  • Which jobs it is good at (and which it isn't)
  • How it compares with Excel VBA, macros and Python

Concept

What is Apps Script?

Google Apps Script is JavaScript that runs on Google's servers and can control Google Workspace apps: Sheets, Gmail, Drive, Docs, Calendar, Forms and more. You don't install anything — you write code in the browser, and Google runs it for you.

If you know Excel VBA, think of Apps Script as "VBA for Google Sheets", with one big difference: it can also send emails, create Drive folders, make PDFs and call websites — all from the same script.

What can you automate?

Task Without code With Apps Script
Send 200 personalised emails from a sheet Copy-paste 200 times One click
Make a PDF invoice for every new order Fill a template by hand Automatic on each new row
Get an alert when stock is low Check the sheet daily Email arrives on its own
Pull exchange rates or gold rates from an API Type them in Updates every hour

When should you use it?

Use Apps Script when:

  • Your data already lives in Google Sheets / Forms / Drive.
  • The task is repetitive and follows clear rules.
  • You want it to run on a schedule or when something happens (a form is submitted, a cell is edited).

Pick something else when:

  • You need heavy data processing (millions of rows) → Python is better.
  • Your team works only in desktop Excel → use VBA or Power Automate.
  • You need a script to run for hours → Apps Script stops a single run after about 6 minutes.

Your first script (2 minutes)

  1. Open any Google Sheet.
  2. Click Extensions → Apps Script.
  3. Replace the code with:
function sayHello() {
  SpreadsheetApp.getActiveSpreadsheet().toast('Namaste from Apps Script!');
}
  1. Click Save, then Run. Approve the permission prompt the first time.
  2. Go back to the sheet — a small popup appears in the bottom-right corner.

You just ran code on Google's servers that talked to your sheet.

Key points

  • Apps Script = JavaScript + ready-made objects such as SpreadsheetApp, GmailApp, DriveApp.
  • It is free with a Google account; limits (quotas) depend on whether you use a personal or Workspace account.
  • Scripts run in the cloud, so they keep working even when your computer is off.

Exercises

mediumPractice 1

Change the toast message to show today's date. Hint: new Date() gives the current date and time.

Quiz

Where does Apps Script code run? a) On your laptop b) On Google's servers c) Inside Excel
On Google's servers
Which task is a poor fit for Apps Script? a) Emailing a weekly report b) Auto-creating invoices c) Processing 5 million rows of data
Processing 5 million rows of data
What is Apps Script and when to use it · Google Apps Script | ExcelWalaa