How can I automatically sort files in Google Drive sub-folders based on upload date?

  • 16 August 2023
  • 1 reply

  • Anonymous
  • 0 replies

Context: Currently, I have a zap which automatically uploads all files received in my Gmail account to one specific folder (ex. named “2023”) in Google Drive. In this folder, I have also created sub-folders for each period (Q1,Q2,Q3 and Q4). Is there a way to automate further filing of these files uploaded to the 2023 folder as they arrive, so that they get automatically moved to the corresponding sub-folder based on the date at which they are uploaded?


Ex. any files uploaded from January - March would get moved to Q1, April to June to Q2, etc.


Thank you

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +14

Hi @Mr Zap 

Good question.

Try this…

Make sure your subfolders have this naming convention: YYYY_Q#

Then you can add these Zap steps:

  1. Trigger: Gmail - New Attachment
  2. Action: Formatter > Date & Time > Format
    1. Use a timestamp from Step 1
    2. Format as MM
  3. Action: Formatter > Utilities > Lookup Table
    1. Configure a lookup table to have MM translated to Q#
  4. Action: GDrive - Find Folder
  5. Action: GDrive - Upload File


NOTE: Steps 2-3 could be replaced with 1 Code step.