What is a simple trigger in Google Sheets?

A simple trigger is an Apps Script function with a reserved name such as onEdit, onOpen, or onInstall that Google Sheets runs automatically when that event happens. You do not create it in the Triggers UI; you just name the function correctly in Code.gs.

When to use it

Use simple triggers for lightweight reactions: custom menus on open, quick validation on edit, or install setup.

When to skip it

Use installable triggers when you need UrlFetchApp, send mail without user context limits, or time-driven schedules.

How it works

  1. 1

    Name the function exactly onEdit, onOpen, or onInstall.

  2. 2

    Accept the event object e when the platform provides it.

  3. 3

    Keep handlers fast to avoid slowing editors.

  4. 4

    Test by performing the event in the sheet.

  5. 5

    Upgrade to installable trigger if authorization errors appear for restricted services.

Examples in Google Sheets

onOpen menu

onOpen adds a Custom Tools menu with one-click exports.

onEdit stamp

onEdit writes Last updated when column D changes.

Build this without starting from a blank cell

Use a Better Sheets tool for simple trigger, then watch a walkthrough when you want the full pattern.

Better Sheets resources

Common mistakes

  • Typo in function name so nothing runs.
  • Heavy API work inside onEdit.
  • Expecting simple onEdit to run when formulas recalc from other cells.

Frequently asked questions

Simple vs installable?
Simple triggers use reserved names and have tighter permissions. Installable triggers are created in the Triggers UI.
See simple triggers listed?
They may not appear in Triggers page the same way installable ones do.

Related Tutorials

Watch how simple trigger works

Browse more tutorials
Spreadsheet Automation 101 Lesson 2: onEdit() Trigger

Spreadsheet Automation 101 Lesson 2: onEdit() Trigger

One of the things to learn: We can only have one onEdit() in our entire ...
Automate Google Sheets With Zero Experience

Automate Google Sheets With Zero Experience

By the end of this video you should be knowledgeable about how to automa...
What Can You Automate in Google Sheets? Every single trigger available to Google Sheet users

What Can You Automate in Google Sheets? Every single trigger available to Google Sheet users

Learn about triggers, hourly, daily, weekly, etc.
Wrap Your Mind Around This - Learn to Code in Google Sheets Part 6

Wrap Your Mind Around This - Learn to Code in Google Sheets Part 6

this completes learn to code in Google Sheets and I wanted to finish off...
Can I get alerted when a tab name is changed?

Can I get alerted when a tab name is changed?

Find out in this quick experiment if a tab name can be alerted to the ow...
Automatically Delete All Sheets If Not Listed Name

Automatically Delete All Sheets If Not Listed Name

A raw, 1 shot take of figuring out how to automatically delete all sheet...

Related blog posts

Guides that explain simple trigger in more depth.

Browse the blog

Related glossary terms

Done reading about simple trigger?

Membership unlocks 636+ tutorials, unlimited generators, and every template. Practical lessons. Zero fluff.

Need this once

Jump to a free tool or a single tutorial for this topic.

Learning Sheets for real

Unlock the full library, generators, and templates with membership.