TriggerShelf

Recipe

Create a Drive folder for each new row in Google Sheets

Trigger: Time-drivenServices: SpreadsheetApp, DriveAppMock-tested: Nov 2026

For every row that has a name but no link, the script creates a folder inside a parent folder and writes the folder link back into column B.

Set it up

  1. Make a parent folder in Drive and copy its ID. Paste the script and set parentId in CF.
  2. Run createFolders and approve the prompts.
  3. Optional: add a time-driven trigger so new rows get folders on their own.

The script

/**
 * Create a Drive folder for each new row and write its link back to the sheet.
 * Columns: A Name, B Folder link (filled by the script).
 * Add a time-driven trigger (every 10 minutes or hourly) for createFolders.
 */
var CF = { sheetName: 'Sheet1', parentId: 'PASTE_PARENT_FOLDER_ID', linkCol: 2 };

function createFolders() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(CF.sheetName);
  var values = sheet.getDataRange().getValues();
  var parent = DriveApp.getFolderById(CF.parentId);
  var made = 0;
  for (var i = 1; i < values.length; i++) {
    var name = String(values[i][0]).trim();
    if (!name || values[i][CF.linkCol - 1]) continue;
    var folder = parent.createFolder(name);
    sheet.getRange(i + 1, CF.linkCol).setValue(folder.getUrl());
    made++;
  }
  return made;
}
Test status. 3 of 3 automated checks pass, run Nov 2026 against simulated Google services. This recipe has not yet been run inside a live Google account. Test it on a copy of your sheet first.

What you should see

ClientFolder
Northwinddrive.google.com/drive/folders/1AbC...
Fabrikam

Links are written to column B. Sample values, not output from a real account.

Common errors and fixes

Exception: No item with the given ID could be found
parentId is wrong, or the account cannot see that folder.
Duplicate folders
Column B must keep the link. If it is cleared, the next run makes another folder.
Exceeded maximum execution time
Run it more often, or process rows in batches.

Permissions. Running this script asks you to grant Google permissions for the services listed above, to your own script. TriggerShelf never receives your Google data. See the permissions table. Google will show "Google hasn't verified this app"; that is expected for a script you paste yourself.