Write Groups To Tabs
writeGroupsToTabs(ss, groups, headers) takes rows grouped by a key, like one group per owner, region, or client, and writes each group to…
Write Groups To Tabs
writeGroupsToTabs(ss, groups, headers) takes rows grouped by a key, like one group per owner, region, or client, and writes each group to…
Rename Files From Rows
A sheet with a file id column and a new-name column, and a pile of Drive files that still say IMG_4021 or Copy of Proposal…
Archive Rows Before Date
The orders sheet has 40,000 rows and every script that reads it is slow. archiveRowsBeforeDate(sheet, dateHeader, cutoff, opts) moves every…
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…
Import a Drive CSV into a sheet in safe chunks
Export guides get the glory; imports fail at 4am with "Exceeded maximum execution time" after writing 8,000 of 40,000 rows. Read the Drive…
Group Objects By Key
You have 200 rows and need one email (or one Drive folder, or one export) per client. Nested loops and “remember the last name” logic get…
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…