File Form Uploads
fileFormUploads(e, opts) runs from an on-form-submit event, moves each uploaded file into a folder for that respondent, and renames it date…
File Form Uploads
fileFormUploads(e, opts) runs from an on-form-submit event, moves each uploaded file into a folder for that respondent, and renames it date…
List Largest Drive Files
listLargestDriveFiles(opts) finds the biggest files you own in Drive and returns them as row objects — name, MB, owner, updated, url…
List File Comments
listFileComments(fileId, opts) pages through a file's Drive comments and returns one [author, created, content, quotedText, link] row per…
Copy Folder Recursive
copyFolderRecursive(sourceId, destParentId, opts) copies a Drive folder, every subfolder, and every file into a new (or existing) folder of…
Get File Access
getFileAccess(fileId) returns the access the script's effective user has on a Drive file or folder: 'edit', 'comment', 'view', or 'none…
Trash Files Older Than
trashFilesOlderThan(folderId, days, opts) looks at the files in one folder (never subfolders) and trashes those whose last updated time is…
Remove Access In Folder
removeAccessInFolder(folderId, email, opts) looks at every file in a Drive folder and removes that person as an editor or viewer. It…
Share a Drive file when a row’s status flips to Approved
The deliverable is done. Someone flips the row to Approved. Then they open Drive, find the file, click Share, paste the client’s email, pick…
Convert Xlsx To Sheet
convertXlsxToSheet(fileId, folderId) copies an Excel file (.xlsx or .xls) to a Google Sheet in the target folder, using the Drive advanced…
List Folder Sharing
listFolderSharing(folderId, {recursive}) walks a Drive folder and returns rows ready for setValues: Name, URL, Owner, Editors, Viewers…
Watch a Drive folder and enqueue new files
Clients drop invoices into a shared “Inbox” folder. Somebody is supposed to notice, open each one, and log it. Some weeks that works. Some…
Route Form file uploads into the right Drive folder
File-upload questions are one of the best things about Google Forms, right up until week three. Every receipt, contract, and headshot is…
Fill Doc Template
A Doc full of {{Client}} and {{Amount}} placeholders, a sheet row with those headers, and a Drive folder for the finished copies…
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…
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…
Share File With Email
Sharing from a script is one line, until the job runs twice and the client gets two “shared with you” emails. shareFileWithEmail…
List Drive Files Modified Since
“What landed in the Inbox folder since last run?” is the start of half the Drive automations we write. listDriveFilesModifiedSince…
Move File To Folder
Form uploads land in one big “(File responses)” folder. Exports land in My Drive root. moveFileToFolder(fileId, folderOrId) puts a Drive…
Write Values as a CSV File in Drive
After a nightly sync you often want a dated CSV in Drive without opening Sheets. Build the 2D array, turn it into CSV (reuse valuesToCsv…
Extract a Drive File ID from a URL
Operators paste Share links, "Open in new tab" URLs, and bare ids into the same column. extractDriveFileId normalizes that mess into a Drive…
Get or Create a Nested Drive Folder Path
One folder name isn't enough when exports land under Exports/2026/09 or Clients/Acme/Incoming. Walk a slash-separated path from a parent…
Get or Create a Drive Folder by Name
Exports, backups, and client drop folders all need a stable place in Drive. This returns the first child folder with that name under a…
How to Create Automated Snapshots of your Google Sheet
In this video, we'll show you how to automate snapshots of your Google Sheets and have those logs stored in a separate Google Drive folder…