Google app
Triggers
A trigger is a saved schedule or event rule in ScriptApp that runs your function on time, on edit, or on form submit.
Choose a task using TriggersStart with an outcome
Tasks that use Triggers
Choose the result first. The service flow shows what this automation connects.
- Triggers Run an Apps Script function every day
Run the setup function once, then Apps Script calls the reminder function each day around your chosen hour.
- Triggers Add a timestamp when a row changes
Change a status cell and the script stamps the same row with the current date and time. There is nothing to install beyond saving the script.
- Triggers Copy a row when a checkbox is checked
Check an Active checkbox on a Students tab and an onEdit trigger appends a tracking row to your Tracking tab once, then marks the source row Tracked so re-checking does not add a duplicate.
- Triggers Send an email when a status changes
When someone changes a status dropdown in Google Sheets, email the address on that row, including on newly copied tabs.
- Triggers Respond to a Google Form submission
Add a small response function, then install a form-submit trigger so each new answer produces a private email summary.
- Triggers Send a confirmation to the form respondent
When the form collects verified email addresses, a form submit trigger can send the person who answered a short thank you that repeats their answers.
- Triggers Email yourself a weekly sheet summary
Run the setup function once. Each Friday the script reads the Orders tab, counts the nonblank rows, totals column C, counts the rows that are not Done, and emails the account that installed it.
- Triggers Back up a spreadsheet to Drive every week
Run the setup function once. Every Monday morning the script copies the spreadsheet into a Drive folder and puts the date in the copy name. The original is never touched.
- Triggers Email yourself tomorrow’s calendar agenda
A setup function installs one daily trigger for the early evening. Each evening the script reads tomorrow on your main calendar and emails you the list.
- Triggers Check a website and alert when it is down
An hourly trigger fetches one address. The script remembers the last result in a script property, so a long outage produces one alert instead of one every hour.
Snippets
Small pieces for Triggers
Complete functions you can paste and run one at a time.
Object reference
Objects available in Triggers
Open an object when you need to get it, try a common action, or inspect exact method signatures.
- Object reference Trigger builder
ScriptApp.newTrigger(functionName) returns a TriggerBuilder that configures a timeBased(), forSpreadsheet(), or forForm() trigger before create() saves it.
- Object reference Trigger
A ScriptApp.Trigger is one installed schedule or event rule owned by the current user in this project. Use ScriptApp.getProjectTriggers() to inspect its handler function or delete it with ScriptApp.deleteTrigger().
- Object reference Form response
A FormResponse contains the answers sent in one Google Form submission. A form-bound submit trigger passes it to your function as event.response, where getItemResponses() returns the submitted item responses.