Sync files from Google Drive every 5 minutes

Recipe ToolsMarketingDocument/FileSales Enablement

What it does

When the clock triggers every 5 minutes, this automation searches Google Drive for files in a specific folder. It downloads each file, uploads it to a new location, and retries up to 3 times if an error occurs.

Who it's for

Operations teams who need to keep files synchronized across Google Drive folders on a schedule.

How teams use this

Sync files on a regular schedule

Run the file migration every 5 minutes so files stay current in both folders without manual intervention. The team gets consistent synchronization without opening Google Drive.

Migrate files to a backup folder

Point the automation at a backup folder instead of the original destination so files are preserved in a separate location. The same flow works with only the target folder changed.

Filter files by name or type before syncing

Add a condition to only migrate files that match a specific name pattern or file type, so unnecessary files are skipped. The automation will check each file against the filter before downloading.

Notify teams when migration completes

Include a notification step so the team knows when all files have been synced to the new folder. Set up the notification to include the count of files migrated.

How it works

  1. Check every 5 minutes. The automation runs on a schedule, checking every 5 minutes for files to migrate.
  2. Search for files in the source folder. Search Google Drive for all files in a specific folder so each one can be processed in the next steps.
  3. Download each file from Google Drive. For each file found, download its contents from Google Drive so the file data is ready to upload to the new destination folder.
  4. Upload file to the new folder. Upload each downloaded file to the new destination folder in Google Drive with updated identifiers so files are in the correct location.
  5. Retry on error up to 3 times. If an error occurs during download or upload, retry all steps in the monitor block up to 3 times before stopping the migration.