If you're trying to automate something in Google Workspace, you have three main tools: Macros, Apps Script, and Add-ons. They're related — Macros and Add-ons are both built on Apps Script — but they serve very different purposes.
Quick comparison
| Feature | Macro | Apps Script | Add-on |
|---|---|---|---|
| Where it lives | Bound to one file | Bound to one file or standalone | Published to Marketplace |
| Code editor access | No (recorded) / Yes (edited) | Yes | Yes |
| Runs across multiple files | No | Standalone projects can | Yes |
| Shared with others | No | Via deployment/copy | Yes (public or private) |
| Requires publishing | No | No | Yes |
| Can use triggers | No | Yes | Yes |
| Best for | Quick repetitive actions | Custom automations | Distributable tools |
Macros
A Macro is the simplest option. You record a sequence of actions in a Google Sheet (like formatting, sorting, or copying cells) and Sheets writes the Apps Script code for you.
When to use a Macro:
- You want to automate a simple, repetitive formatting or data task.
- You're not comfortable writing code.
- The automation only applies to one specific spreadsheet.
How to create one:
- In Google Sheets: Extensions > Macros > Record macro.
- Perform your actions.
- Click Save and give it a name.
- Run it any time from Extensions > Macros > [Your Macro Name], or assign a keyboard shortcut.
You can also view and edit the generated code under Extensions > Apps Script.
Apps Script
Apps Script is what Macros are built on. You write JavaScript directly in the editor, which gives you full control. Scripts can be:
- Container-bound — attached to a specific Sheet, Doc, Form, or Site.
- Standalone — independent projects in Google Drive, not attached to any file.
When to use Apps Script:
- You need logic, conditions, or loops (things Macros can't do).
- You want to connect to external APIs or other Google services (Gmail, Drive, Calendar).
- You need to run code on a schedule with time-based triggers.
- You're building something just for yourself or a small team.
Add-ons
An Add-on is an Apps Script project that's been packaged and published so others can install it. Add-ons appear in the Extensions menu of Google Workspace apps.
There are two types:
- Editor Add-ons — work within Sheets, Docs, Slides, or Forms.
- Workspace Add-ons — appear in the side panel across multiple apps (Gmail, Calendar, etc.).
When to build an Add-on:
- You want to share your tool with other people (publicly or within your organisation).
- You're building a product or internal tool for a larger team.
- You need users to install it from the Google Workspace Marketplace.
Publishing requirements:
- Add-ons must go through Google's review process for public Marketplace listing.
- You can publish privately (to your Google Workspace domain) with less friction.
Decision flowchart
Can they work together?
Yes. You'll often start with a container-bound Apps Script, then publish it as an Add-on when you're ready to share it. Macros are just recorded container-bound scripts — you can always open their code and extend them.
Summary
- Macro = record and replay simple actions, no coding required.
- Apps Script = full scripting power for automations you manage yourself.
- Add-on = packaged Apps Script you distribute to others.
For most automation tasks on this site, you'll be using Apps Script directly. It gives you the most flexibility without the overhead of publishing.