What are Apps Script triggers in Google Sheets?
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.
When to use it
Use triggers when work should happen automatically without someone opening a menu: nightly backups, reminder emails, syncing rows, or validating data the moment it is entered.
When to skip it
Avoid triggers for one-off tasks you could run manually, or when a built-in feature like conditional formatting or data validation is enough. Too many overlapping triggers make debugging hard.
How it works
-
1
{:"Decide the event"=>"edit, open, clock (time-driven), or form submit."}
-
2
Write a handler function with a clear name, for example sendWeeklyReport.
-
3
For simple events, use reserved names onEdit or onOpen in the script file.
-
4
For installable triggers, open Triggers > Add trigger and pick the function, event source, and type.
-
5
Authorize the script the first time it needs Gmail, external URLs, or other restricted services.
-
6
Monitor Executions and set notifications for failures on production spreadsheets.
Examples in Google Sheets
Daily digest at 8 a.m.
A time-driven trigger runs every day, reads new rows from a Responses sheet, and emails a summary with MailApp.sendEmail.
Welcome row on form submit
A form-submit trigger fires when Google Forms adds a row, then copies key fields to a CRM tab and assigns an owner from a lookup table.
onOpen custom menu
onOpen adds a Better Sheets menu with items that call your functions, giving non-technical users one-click tools.
Better Sheets resources
Common mistakes
-
Creating duplicate time-driven triggers every time you edit the script, so the same job runs twice.
-
Expecting simple onOpen to call UrlFetchApp without an installable trigger and authorization.
-
Using a 1-minute trigger for work that only needs to run once per day, wasting quota.
-
Not checking e.range when multiple editors use the sheet, causing race conditions on busy tabs.
-
Leaving test triggers enabled in a shared production file after debugging.
Frequently asked questions
- What is a simple trigger?
- A simple trigger is a function with a reserved name like onEdit, onOpen, or onInstall that runs automatically with limited permissions and no Triggers UI entry.
- What is an installable trigger?
- An installable trigger is configured in Apps Script > Triggers. You choose the function, event, and optional failure notifications. It can access more services after authorization.
- How do I delete a trigger?
- Open the Triggers page in Apps Script, find the row, and click the three-dot menu > Delete trigger.
- Can triggers run if the sheet is closed?
- Time-driven and some installable triggers can run without the spreadsheet open. Simple onEdit and onOpen only run when a user interacts with the file.
- Who pays for trigger execution time?
- Execution counts against the Google account that owns the trigger or authorized the script, subject to Apps Script quotas documented by Google.
- Can one function have multiple triggers?
- Yes, but it is clearer to use separate functions per event so logs and failures are easier to trace.
- Do triggers work on copies of a sheet?
- Triggers are tied to the script project inside that spreadsheet file. A copy gets its own script container; triggers do not copy automatically in all cases, so verify after duplicating.
- How do I test a time-driven trigger?
- Run the handler manually once from the editor, then add a short interval trigger for testing and switch to production timing when you are confident.
Related Tutorials
Watch how Apps Script triggers works
What Can You Automate in Google Sheets? Every single trigger available to Google Sheet users
Now Do It Every Damn Day - Learn to Code in Google Sheets Part 5
Automatic Weekly Backup of Google Sheets
Automate Google Sheets With Zero Experience
Send a Button from Google Sheets in an Email
Related blog posts
Guides that explain Apps Script triggers in more depth.
What Can You Automate in Google Sheets? Every single trigger available to Google Sheet users
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 →How to Send Google Forms Entries Automatically with Apps Script
Google Forms provides basic email notifications for form submissions, but enhancing these notifications with detailed summaries can significantly improve productivity and response management.
Read post →What's Better Than Google Sheets?
Nothing is better than Google Sheets. You just need to learn more about the unlimited power of Google Sheets. Functions, Formulas, Apps Script and more.
Read post →Related terms
onEdit trigger
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 →Script Editor
The Script Editor is the Apps Script workspace inside your spreadsheet where you write JavaScript that talks to Sheets, Gmail, and other Google services. You open it from Extensions > Apps Script. Every function you save can be run manually, bound to a trigger, or linked from a custom menu.
Read guide →Apps Script web apps
A web app turns your script into a URL that runs doGet or doPost when someone visits or posts data. The page can read and write your spreadsheet behind the scenes, which is useful for simple forms, internal tools, and lightweight APIs without standing up a separate server.
Read guide →Google Sheets automation
Automation means work happens without repeating the same clicks every day: imports update, emails send, rows move, and dashboards refresh. In Sheets, automation usually stacks built-in features, Apps Script, and sometimes the Sheets API or add-ons. Start with the lightest tool that still solves the job.
Read guide →Done reading about Apps Script triggers?
Membership unlocks 600+ 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.