Archive Gmail attachments to Google Drive

ProductivityDocument/File

What it does

When a new email arrives in Gmail, this automation checks if the attachment filename matches a test pattern. If it does, the file is downloaded from Gmail and uploaded to Google Drive so the team can access it centrally.

Who it's for

Operations teams who need to archive email attachments to Google Drive automatically.

How teams use this

Archive test reports to shared storage

Emails with 'test' in the filename are downloaded and stored in Google Drive without manual steps. The team has a searchable archive of all test files in one place.

Route files to team folder

Change the Google Drive destination to a team folder so all matching attachments land in the same shared space. The automation logic stays the same.

Filter by sender or date range

Add conditions to only download attachments from specific senders or within a date range. This narrows the files that sync to Google Drive.

How it works

  1. Monitor for new email. A new email arrives in Gmail with an attachment that needs to be evaluated and potentially stored.
  2. Check if filename matches pattern. Evaluate the attachment filename in Gmail to see if it contains 'test'. Only proceed if the match is true.
  3. Download the attachment from Gmail. Extract the file from the email in Gmail so it can be transferred to Google Drive for storage and access.
  4. Upload file to Google Drive. Store the file in Google Drive so the team can access it from one central location without returning to Gmail.