Back to BlogAutomation

Organize Creative Assets in Google Drive with Auto-Tagging and Version Control

Stop searching for "Final_Final_V2.pdf". Automatically rename, tag, and sort creative assets in Google Drive using Apps Script.

December 26, 2025
2 min read

Creative teams lose 20% of their day searching for files. "Is it in the shared drive?" "Did you Slack it?" "Which V3 is the real V3?"

Digital Asset Management (DAM) software costs $500/month. Google Drive is free, but it's dumb. It doesn't enforce naming conventions.

...Unless you teach it to.

Here's The Solution

Set up an uploads folder that triggers a script. Drop a file in named Nike_Social_Q4.png and the script auto-renames it with a date and version (2025-12-26_Nike_Social_Q4_V1.png), moves it to the right folder structure (/Nike/Social/), and logs it in a spreadsheet.

The Code: The Drive Sentinel

1. Setup

  • Inbox Folder: ID INBOX_FOLDER_ID.
  • Root Folder: Where client folders live.
  • Log Sheet: A sheet to track every asset.

2. The Script

// CONFIGURATION
const INBOX_ID = "YOUR_INBOX_ID";
const ARCHIVE_ROOT_ID = "YOUR_ARCHIVE_ID";
 
function organizeAssets() {
  const inbox = DriveApp.getFolderById(INBOX_ID);
  const files = inbox.getFiles();
  
  while (files.hasNext()) {
    const file = files.next();
    const name = file.getName();
    
    // Naming Logic: "Client_Campaign_Type.ext"
    // e.g., "Nike_AirMax_Social.jpg"
    const parts = name.split('_');
    
    if (parts.length < 3) {
      Logger.log(`Skipping ${name} - invalid format`);
      continue;
    }
    
    const client = parts[0];
    const campaign = parts[1];
    
    // 1. Find/Create Client Folder
    const clientFolder = getOrCreateFolder(ARCHIVE_ROOT_ID, client);
    
    // 2. Find/Create Campaign Folder
    const CampaignFolder = getOrCreateFolder(clientFolder.getId(), campaign);
    
    // 3. Rename with Date
    const datePrefix = Utilities.formatDate(new Date(), Session.getScriptTimeZone(), "yyyy-MM-dd");
    file.setName(`${datePrefix}_${name}`);
    
    // 4. Move File
    file.moveTo(CampaignFolder);
    
    // 5. Log it (Optional)
    // logToSheet(file.getUrl(), client, campaign);
  }
}
 
function getOrCreateFolder(parentId, name) {
  const parent = DriveApp.getFolderById(parentId);
  const folders = parent.getFoldersByName(name);
  
  if (folders.hasNext()) {
    return folders.next();
  } else {
    return parent.createFolder(name);
  }
}

3. Set the Trigger

Run organizeAssets every 10 minutes.

Version Control Hack

Google Drive actually has version history built-in, but most people create duplicates (V1, V2). Better way: Right-click a file > Manage Versions > Upload New Version. This keeps the URL the same. You can update the PDF behind the link without breaking the link you sent the client.

Newsletter

Get more tips like this

Subscribe for practical Google Workspace automation tips.

Free updates. No spam. Unsubscribe any time.

Want more help?

We're here to help. Drop us an email and let's explore how we can optimize your workflows.

Email us

hello@mereth.dev

creative operationsDAM automationGoogle Drive automationApps Scriptasset managementproductivity