Pushbuild

Save Gmail attachments to Google Drive automatically

A free Google Apps Script that saves the attachments from the emails you choose into a Drive folder every 15 minutes and logs each file in your sheet.

Short answer: Use a free Google Apps Script that saves the attachments from the emails you choose into a Drive folder every 15 minutes and logs each file in your sheet. It runs in your own Google account; nothing is sent to us. Setup takes 5 steps: Make a Drive folder; Make a Settings tab; Paste the script; Turn it on; What it does.

How to set it up

  1. Make a Drive folder. Create a folder in Google Drive for the files and copy its link.
  2. Make a Settings tab. Open a new Google Sheet and add a tab called Settings. In B1, write which emails to take, as a Gmail search, such as from:billing@supplier.com or subject:invoice. Paste the folder link in B2.
  3. Paste the script. Open Extensions, then Apps Script, paste in the code from our email, and save. Reload the sheet and a Attachments menu appears.
  4. Turn it on. Choose Attachments, then Save every 15 minutes (or Save attachments now to run it once). Google asks for permission the first time, because the script reads your mail and writes to your Drive.
  5. What it does. Each attachment is saved to the folder under its own name, and a row goes in the Saved tab with the date, sender, subject, file name and a link. The email gets a Saved to Drive label so it is never saved twice.
Setup, step by step: 5 steps, done in your own Google account.

Want this set up for your business? Free written scope in 20 minutes

Get the script

Download it free

We'll email you the script (Code.gs). It runs in your own Google account; nothing is sent to us.

By continuing, you agree that Pushbuild may email you about this script and related tips. Unsubscribe any time. Privacy

Have us install it for you

We set it up in your Google account in a short Connect session, connect it to your sheet and check that it runs.

Have us install it

Good to know

  • Images placed inside the body of an email, such as logos in signatures, are skipped.
  • Each run handles up to 50 email threads, so a large backlog is cleared over a few runs.

Questions

What does this script do?

It is a free Google Apps Script that saves the attachments from the emails you choose into a Drive folder every 15 minutes and logs each file in your sheet.

How do I set it up?

In 5 steps: 1. Make a Drive folder; 2. Make a Settings tab; 3. Paste the script; 4. Turn it on; 5. What it does. The full steps are on this page.

Is it free, and does it send my data anywhere?

It is free: enter your email on this page and we email you the script (Code.gs). It runs in your own Google account; nothing is sent to us.

Can you install it for me?

Yes. We set it up in your Google account in a short Connect session, connect it to your sheet and check that it runs.

Want this connected to the rest of your tools? Send us a short brief.

Pushbuild · Automate your business with Pushbuild: pushbuild.com/contact