Apps Script vs. Macros vs. Add-ons: Which Should You Use?

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

FeatureMacroApps ScriptAdd-on
Where it livesBound to one fileBound to one file or standalonePublished to Marketplace
Code editor accessNo (recorded) / Yes (edited)YesYes
Runs across multiple filesNoStandalone projects canYes
Shared with othersNoVia deployment/copyYes (public or private)
Requires publishingNoNoYes
Can use triggersNoYesYes
Best forQuick repetitive actionsCustom automationsDistributable 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:

  1. In Google Sheets: Extensions > Macros > Record macro.
  2. Perform your actions.
  3. Click Save and give it a name.
  4. 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.
// Example: a simple Apps Script that runs on a schedule function sendWeeklyReport() { const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); const data = sheet.getDataRange().getValues(); // ... process data and send email }

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

Is it a simple, one-off action in one spreadsheet? └─ Yes → Use a Macro Do you need logic, triggers, or external services? └─ Yes → Use Apps Script Do you need other people to be able to install it? └─ Yes → Build an Add-on

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.