onOpen menu
onOpen adds a Custom Tools menu with one-click exports.
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.
Use simple triggers for lightweight reactions: custom menus on open, quick validation on edit, or install setup.
Use installable triggers when you need UrlFetchApp, send mail without user context limits, or time-driven schedules.
Name the function exactly onEdit, onOpen, or onInstall.
Accept the event object e when the platform provides it.
Keep handlers fast to avoid slowing editors.
Test by performing the event in the sheet.
Upgrade to installable trigger if authorization errors appear for restricted services.
onOpen adds a Custom Tools menu with one-click exports.
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.
Watch how simple trigger works
Guides that explain simple trigger in more depth.
Make your data tasks simpler & efficient. Discover the power of automation in Google Sheets with a comprehensive guide that covers everything from triggers to scripts.
Read post →Did you know you can actually code in Google Sheets?
Read post →I wanted to share with you one of the simplest apps scripts that has immense power. Email! You can email others, but you can also email yourself.
Read post →The onEdit trigger runs a script automatically when someone changes a cell in your spreadsheet. It is one of the simplest ways to make Sheets react to user input without clicking a custom menu. You define the function in Apps Script and bind it to the onEdit event for that file.
Read guide →The onOpen trigger runs an Apps Script function automatically when someone opens the spreadsheet. It is the standard way to add custom menus, show instructions, or refresh lightweight cache without asking the user to run a macro first. Name the function onOpen or bind it as an installable open trigger.
Read guide →Triggers tell Apps Script when to run a function: on edit, on open, on a schedule, or when a form is submitted. Simple triggers use reserved names like onEdit. Installable triggers are created in the Apps Script Triggers page and can do more, including running as a specific user or on a timer.
Read guide →An installable trigger is configured in Apps Script > Triggers and binds a function to an event such as on edit, on form submit, or time-driven clock. It can run with authorization the simple trigger cannot, and you can set failure notifications.
Read guide →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.