23 posts tagged with “google-drive”

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…

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…

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…

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…

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…