A spreadsheet does not run anything on a clock by itself. Formulas recalculate when a cell changes or the file is opened, so a formula can flag that a task is due but cannot send the reminder, post the report or archive the rows. To run work on a schedule, you need a trigger: a script, an automation flow or an operating system task that starts the work at a set time or in response to an event.
This manual covers how triggers work, how to choose a method, a worked example, the mistakes that cause silent failures, and the limits and costs you should check before go-live.
Scope and Glossary
SOP 1.1: Terms used in this manual
- Trigger: a rule that starts a piece of code or a workflow when a condition is met.
- Time-driven trigger: a trigger that fires at a set time, such as every day at 08:00.
- Event-driven trigger: a trigger that fires when something happens, such as a cell edit, a file open or a form submission.
- Volatile function: a formula, such as
TODAY()orNOW(), that recalculates whenever the sheet recalculates. It does not recalculate on a timer. - Execution log: the record of each trigger run, including start time, duration and any error.
- Quota: a platform limit on run time, daily totals or API calls.
- Run window: the period in which a scheduled task is expected to complete before the next run starts.
SOP 1.2: What a spreadsheet can and cannot do alone
A formula can answer a question such as “is this task overdue?” It cannot answer “send a message now” or “do this every Monday at 07:30” when nobody has opened the file. Formulas are also invisible to the people who need the outcome, because a flag in a cell is only seen by someone looking at that cell.
Use formulas to decide what should happen. Use a trigger to make it happen.
Skip the setup
Generate invoices from a client list and see who has paid, who hasn’t and how late they are.
How Triggers Work
SOP 2.1: Time-driven and event-driven triggers
Time-driven triggers suit recurring work: a daily digest, a weekly snapshot, a month-end export. The schedule is fixed, so you know when the work will run and can plan around it.
Event-driven triggers suit work that depends on a change: a row added to a form, a status cell set to “Approved”, a file opened by a particular user. They run when the event happens, which may be many times a day or never. Check how often the event occurs before choosing this route, because a noisy event can exhaust a quota quickly.
SOP 2.2: The execution chain
Every scheduled task follows the same chain. Map yours to these steps before building anything.
- The trigger fires at the scheduled time or on the event.
- The script or flow reads the data it needs, ideally in one bulk read.
- It applies the test (for example, “due date is before today and status is not Done”).
- It performs the action (send, write, copy, archive) on the matching rows only.
- It records the outcome in a log sheet or the platform’s execution history.
If step 5 is missing, a failure becomes invisible until someone asks why a reminder did not arrive.
SOP 2.3: Time zones and clocks
Scheduled times are interpreted in a time zone. In Google Apps Script the default is the script’s time zone, which you can view and change in the project settings. Set it explicitly rather than trusting the default, especially when the sheet owner and the team are in different zones.
Daylight saving changes shift the local time of a 08:00 run by an hour twice a year on most platforms. If a run at a precise time matters, check how the platform handles the change and decide whether an hour’s variance is acceptable.
Choosing a Method
SOP 3.1: Method comparison
The table below compares the main routes for Google Sheets and Excel. Verify licensing and quota details against current vendor documentation before committing, since these change.
| Method | Platform | Cost basis | Coding needed | Runs with no one logged in | Best suited to |
|---|---|---|---|---|---|
| Apps Script time-driven trigger | Google Sheets | Included with a Google account, subject to quotas | Yes (JavaScript-based) | Yes | Digests, reminders, scheduled writes within one Google account |
| Office Scripts with a Power Automate scheduled flow | Excel for the web | Depends on Microsoft 365 licence and connector tier | Some (TypeScript-based scripts) | Yes | Excel-centred workflows that need email, Teams or other connectors |
VBA with Application.OnTime | Desktop Excel | Included with desktop Excel | Yes (VBA) | No, the workbook and Excel must be open | Local, single-user timed actions |
| Operating system task scheduler calling a script | Any, on a named machine | Included with the OS | Yes | Only if the machine is on and awake | Batch jobs on a server or a dedicated PC |
Two points stand out. Desktop VBA depends on Excel being open, so it fails silently on a laptop that is asleep. Operating system schedulers depend on a machine staying powered on, which is a hidden operating cost if that machine is someone’s desk computer.
SOP 3.2: Selection rules
Work through these questions in order and stop at the first answer that rules a method out.
- Does the task need to run when nobody is using the file? If yes, rule out desktop VBA.
- Does the task need to reach systems outside the spreadsheet platform (email, chat, another database)? If yes, check the connectors available in your licence tier before anything else.
- Does anyone on the team write code? If not, a no-code flow is more sustainable than a script only one person can maintain.
- Will the task run more than a few times per hour? If yes, check the quota for total runs and execution time before choosing.
- Who owns the trigger when that person changes role? Choose a method that can be transferred or owned by a shared account.
Worked Example
This example sends a daily digest of overdue tasks at 08:00 on working days. It uses Google Sheets and Apps Script, because the whole chain fits in one file and needs no paid connector. The same logic can be built in Excel with an Office Script and a flow.
SOP 4.1: Sheet layout
Create a sheet named Tasks with a header row and the following columns.
| Column | Header | Content |
|---|---|---|
| A | Task | Short description |
| B | Owner | Email address of the person responsible |
| C | Due date | Date value, not text |
| D | Status | Open, In progress or Done |
| E | Overdue flag | Formula (see SOP 4.2) |
SOP 4.2: Helper formula for the overdue flag
In cell E2, enter the formula below and fill it down to the last task row:
=IF(AND(A2<>"",D2<>"Done",ISNUMBER(C2),C2<TODAY()),"OVERDUE","")
The formula returns “OVERDUE” only when the task has a name, is not done, has a real date and that date is before today. Checking ISNUMBER prevents a text date, such as “3 May” typed as text, from quietly evaluating incorrectly.
The flag is useful for people who open the sheet. It does nothing for people who do not, which is why the script in SOP 4.3 reads the underlying data directly rather than relying on the flag.
For a view that lists only overdue rows, you can also use FILTER, for example =FILTER(A2:D, E2:E="OVERDUE"), placed on a separate sheet. The script does not need it.
SOP 4.3: The script
Open the sheet, select Extensions > Apps Script, replace the default code with the following and save.
function sendOverdueDigest() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Tasks');
if (sheet.getLastRow() < 2) return;
const tz = Session.getScriptTimeZone();
const today = new Date();
today.setHours(0, 0, 0, 0);
const rows = sheet.getRange(2, 1, sheet.getLastRow() - 1, 4).getValues();
const overdue = rows.filter(r =>
r[0] !== '' &&
r[3] !== 'Done' &&
r[2] instanceof Date &&
r[2] < today
);
if (overdue.length === 0) return;
const lines = overdue.map(r =>
r[0] + ' (owner: ' + r[1] + ', due ' +
Utilities.formatDate(r[2], tz, 'dd MMM yyyy') + ')'
);
MailApp.sendEmail(
'ops@example.com',
'Overdue tasks as at ' + Utilities.formatDate(today, tz, 'dd MMM yyyy'),
'The following tasks are overdue:\n\n' + lines.join('\n')
);
}
Replace ops@example.com with the address that should receive the digest. The guard on the first line stops the function failing when the sheet has only a header row, which is a common cause of errors in the first week.
The script reads the range in one call with getValues(), rather than reading each cell in a loop. This matters for run time once a sheet holds thousands of rows (see Module 7).
SOP 4.4: Create the time-driven trigger
- In the Apps Script editor, select Triggers (the clock icon in the left menu).
- Select Add Trigger.
- Set the function to
sendOverdueDigest, the event source to Time-driven, the type to Day timer and the time to 8am to 9am. - Save and authorise the script when prompted. Authorisation runs under the account that created the trigger, so use a shared or role-based account where possible.
The platform gives a one-hour window rather than an exact minute. That is acceptable for a digest and is an example of a trade-off you should accept consciously.
SOP 4.5: Test before relying on it
- Run
sendOverdueDigestmanually once from the editor and confirm the email arrives. - Add a test row with a due date two days in the past, status Open and your own address as owner. Run again and confirm the row appears.
- Set the test row to Done and confirm it drops out of the digest.
- Open Executions in the Apps Script editor and confirm the runs show as completed, not failed.
- Delete the test row, then wait for the first scheduled run and check the execution log the next morning.
Do not treat a successful manual run as proof that the trigger works. The scheduled run is a separate event and needs its own check.
Ready-made template
To-do lists with checkboxes, recurring tasks and a weekly and monthly view for Excel and Google Sheets.
Common Mistakes
SOP 5.1: Expecting a volatile formula to act
The most frequent error is placing a TODAY() check in a cell and assuming an email will follow. Volatile formulas recalculate on edit or on open, so if nobody opens the file, nothing happens. Build the trigger first and use the formula only as a visible flag.
SOP 5.2: Hard-coded ranges
A script that reads A2:D100 will silently ignore row 101 onwards. Read to getLastRow() or to a named range that expands with the data, and test with a row added at the bottom of the sheet.
SOP 5.3: Duplicate triggers
Each time the setup code or a trigger-creation function runs, it can add another copy of the trigger. The result is a digest sent three times at 08:00. Before adding a trigger in code, list existing triggers with ScriptApp.getProjectTriggers() and delete duplicates. Check the Triggers panel after any change.
SOP 5.4: Wrong owner or broken authorisation
A trigger runs with the permissions of the account that created it. If that person leaves the organisation, or their access to the file is removed, the trigger fails. Create triggers from a shared service account where your policy allows it, and record the owner in the manual.
SOP 5.5: Silent failures
A trigger that errors produces no email to the owner unless you write one. Add a failure notification, or check the execution history on a fixed review cadence (see SOP 8.2). A broken digest that nobody notices for three weeks is a process failure, not a script failure.
SOP 5.6: Concurrent edits and overwrites
A scheduled script that writes to a range can overwrite a formula someone has typed in the same place, or collide with a user editing the sheet at 08:00. Write to dedicated output columns or a separate sheet, and avoid touching input columns unless the task requires it.
Operating Checklist
SOP 8.1: Pre-go-live checklist
- Trigger type confirmed (time-driven or event-driven) and frequency justified against quota.
- Owner or service account recorded in the manual.
- Time zone set explicitly in the project settings.
- Ranges read to the last row, with a test row added at the bottom of the data.
- Duplicate triggers checked in the Triggers panel.
- Manual run completed and output checked.
- Scheduled run observed and logged.
- Failure notification configured or execution-history review scheduled.
- Holiday and date reference lists in place and dated.
- Recipients and data columns reviewed for sensitivity.
SOP 8.2: Ongoing review
Review execution history at a fixed interval. Weekly is sensible for a new trigger and monthly for a mature one. At each review, confirm that runs completed, that the output matches the sheet, that the owner is still valid and that the holiday list covers the coming period. Record the review date in the manual.
Choosing Your Starting Point
If the task is a reminder or digest, begin with a time-driven trigger and a read-only script before you let anything write to the data. A script that only sends an email is easy to test and easy to undo. A script that edits rows, deletes data or sends external messages should have a dry-run mode that logs the intended actions for a week before it goes live.