Close Form At Limit
Google Forms can't stop at 50 sign-ups or at Friday 5pm on its own. closeFormAtLimit(form, {maxResponses, closeAt, message}) checks both and…
Close Form At Limit
Google Forms can't stop at 50 sign-ups or at Friday 5pm on its own. closeFormAtLimit(form, {maxResponses, closeAt, message}) checks both and…
Notify Once
An hourly trigger checks a condition and emails you when it is true. Without a guard you get the same email every hour until someone fixes…
Mirror a tab to another workbook on a schedule (without IMPORTRANGE)
The client wants “their” copy of the Orders tab. You reach for IMPORTRANGE, it works in the demo, and then: the client can’t see it because…
Stamp “last successful run” where ops can actually see it
“Did the sync run last night?” is a question that shouldn’t need you. But if the only answer lives in the Apps Script Executions page, every…
onChange vs onEdit: catch inserts, deletes, and tab moves
onEdit is the hammer everyone reaches for. Then a teammate inserts ten rows, deletes a tab, or drags a sheet to reorder — and your sync…
Move a bound script to standalone without orphaning triggers
The workbook started as “a few menu items.” Now it’s a product shared across files, or you need a library, or the bound project’s authorize…
Snapshot Range To History
Formulas only ever show today's number. The MRR cell said 4,200 last month and 4,650 now, but nobody wrote 4,200 down…
Trigger Inventory For Prompt
Co-Pilot can't see which triggers a project has, so it happily adds a second nightly trigger next to the first, or edits a function without…
Debounce onEdit so your sheet automation doesn’t thrash
Paste twenty status cells and watch your onEdit fan out twenty UrlFetch calls, twenty labeling passes, or twenty “send Slack” attempts. The…
Install Menu Safely
Someone renames exportReport to exportMonthlyReport, the menu still points at the old name, and every click says “Script function not found…
Checkpoint a long run so the next trigger finishes the job
You already batch setValues, respect quotas, and chunk CSV imports. Then a 45-minute export still dies at ~6 minutes with half the work done…
Active User Email Or
Session.getActiveUser().getEmail() returns an empty string more often than you'd think: in installable triggers, in “execute as me” web apps…
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…