Export last night’s filtered rows to a dated CSV in Drive
Ops ask we hear a lot: after the nightly sync, dump “status = done” (or last 24h) rows into Exports/2026-09-18.csv without opening Sheets…
Export last night’s filtered rows to a dated CSV in Drive
Ops ask we hear a lot: after the nightly sync, dump “status = done” (or last 24h) rows into Exports/2026-09-18.csv without opening Sheets…
Is Last Business Day Of Month
Apps Script has no “last business day of the month” trigger. The reliable pattern is a daily time trigger plus a guard at the top of the job…
Under Time Budget
Apps Script kills a execution around the 6-minute wall. If your loop is still mid-UrlFetch when that happens, you lose the chance to write a…
Script Write Guard
Your nightly job rewrites 400 rows by row number. Meanwhile someone edits a cell, your installable onEdit auto-sorts the sheet, and the job…
Create One Shot Trigger At
Some jobs should run once: send the reminder Thursday at 9, close the form at midnight, re-check the invoice in two hours…
Pause a nightly job without deleting the trigger
Deleting a time-driven trigger to "turn off" a nightly job feels clean until Monday when nobody remembers the exact hour, timezone, or…
Simple triggers vs installable triggers (when onEdit lies to you)
You wrote a perfect onEdit that emails the team when Status flips to Done — and nothing happens. Or worse: it works when you edit, then…
Debounce Or Skip
onEdit fires for every cell change — paste 40 rows and your automation thrashes. debounceOrSkip uses CacheService as a quiet window: if a…
Read / Write a Job Checkpoint
Long jobs hit the ~6-minute wall mid-batch. A checkpoint in Script Properties — { key, cursor, updatedAt } — lets the next timed trigger…
Email yourself when the nightly job fails
You've got a time-driven sync that "mostly works" until it doesn't — and you find out three days later from a confused teammate. Triggers…
Get UI Safe
SpreadsheetApp.getUi() only exists when a user has the spreadsheet open. Time-driven and many installable triggers are headless — calling…
Try Lock Or Skip
Time-driven triggers and overlapping edits collide. withScriptLock waits then throws if it can't acquire — great when failure must be loud…
Setup your triggers once (no doppelgängers)
Re-running "Install triggers" should be safe. In too many client workbooks it isn't — every Setup click stacks another time-driven job, and…
Delete Triggers by Handler Name
Re-running an install function without cleanup creates duplicate triggers — and suddenly your sync fires five times. This deletes every…
Create a Daily Time-Driven Trigger
Time-driven triggers are how most overnight syncs stay hands-off. This helper creates a once-per-day trigger for a named function around the…