How to automatically save Gmail attachments to Google Drive

Relay.app is an automation tool that lets you automate actions across Gmail, Google Drive, and many other apps. In this guide, we'll show you how to use Relay.app to automatically run the Google DriveUpload file” action for each GmailEmail received” event.
Gmail logoGmail > Google Drive
Trigger
Last triggered
Gmail logoEmail received
Google Drive logoUpload file

💡 About this workflow

When I was the product lead for Gmail, we were constantly trying to figure out ways to help users get the important information coming in through their email into other tools. Perhaps the most common example of this was the need to save attachments to Google Drive. People need to do this for a ton of reasons: uploading invoices and receipts to a finance folder, saving signed documents from e-signature tools to a legal folder, adding incoming resumes to a hiring folder, and much more. To make this easy, we built a little button that users could click on top of an attachment to store it in Drive in one click. This helped a bit, but it still fell short in a few ways. First, you’d have to open the email, scroll down, and remember to click it for each attachment. Second, to put the file in the right folder, you’d have to click many more times to find the right place. Third, you couldn’t change the title of the attachment before it was saved. We built Relay.app to do this better. Relay.app is a workflow automation tool that lets you automate actions across Gmail, Google Drive, and many other apps. Using Relay.app, you can automatically save attachments into the right folder in Google Drive. Unlike other automation tools, Relay.app lets you add human-in-the-loop steps, for example to edit the title of the document before it gets saved. This guide will walk you through how to set it up!
Jacob Bank
Jacob Bank
Founder/CEO
1

Add a Gmail "Email received" trigger

After creating a new playbook, click "Add trigger," and select "Email received" under "Gmail."

Next, set up the rules for which emails you want this playbook to trigger on. For example, you can choose to only use messages with a certain sender, containing specific words in the subject, or that have a certain label. If this is your first time using a Gmail integration in Relay, you'll be prompted to connect your Gmail account.

Now, every time an email is received in Gmail that matches your criteria, your playbook will run automatically.

2

Add a Google Drive "Upload files" step

Next, click "Add step" and select "Upload files" in the menu under "Google Drive." Connect Google Drive to Relay if you haven't already.

Choose the folder in Drive that you want to save the attachments to. Then, under the "Files" dropdown, select Mail -> Attachments.

3

Turn on the playbook

Once you are finished setting up your playbook, it's time to activate it. Just click the On/Off toggle button in the header to turn it on.

The playbook will now run automatically whenever an email is received in Gmail that matches your criteria, and all of the email's attachments will be saved to Google Drive.

More how-to guides featuring Gmail and Google Drive

See all how-to guides ➔

What will you automate?

Sign up and get started with your first Relay.app playbook today.
Background image