How to upload select Gmail attachments automatically to cloud storage

Advertisement

It can be quite beneficial to move select Gmail email attachments directly to a cloud storage provider such as Google Drive, Dropbox or Microsoft's OneDrive.

The reason is simple: Usually, you get much better file handling capabilities there, and options to share the files with other users are also integrated into most file hosting solutions.

If you are a teacher, you could ask your students to send emails to your Gmail account with their homework attached to them, and have the files moved automatically to your file hosting solution of choice.

You could also use that for work. Automatically add all attachments to a folder on the file hosting site that is shared with all team members, so that everyone has access to those files even if they do not have access to the email account itself.

It takes two steps to create such a solution:

  • You need to create a filter on Gmail that specifies which attachments gets transferred automatically.
  • You need an IFTTT account and create a recipe there.

Create the filter on Gmail

We start with the filter, as we need it to create a new recipe on IFTTT. Here is what you need to do:

  • Visit the Gmail website and sign in to your account if you have not done so already.
  • Click on the options button on the top right and select settings from it.
  • Select filters from the tabs displayed at the top, or open this link directly instead.
  • Click on "Create a new filter".
  • You need to specify when the rule will be triggered. Since we want to transfer attachments, we have to select "Has attachment" here. If you would leave it at that, all attachments would be transferred to the file hosting provider.
  • You can limit this in several ways. Select a To address, a subject, or "has the words" to limit it. You could create a filter that would only add the label if the subject contains the word "work", or only emails that are sent to a specific address.

gmail attachments label

  • Click on "Create filter with this search" which takes you to the final page. Here you select what you want to happen to matching emails.
  • Select "Apply the label", and then Choose label > New label from the menu next to it.
  • Type a label name, e.g. work and click create.

label

  • You are redirected to the filters tab again. Here you see the label listed. Copy it or remember it, as we need it on IFTTT.

IFTTT

I have mentioned IFTTT (If This Then That) before here on Ghacks.It allows you to create automated rules that it processes for you, something along the like IF the sun shines tomorrow Then send me an email.

Rules use a trigger channel that defines the "This" component of the rule. A trigger channel is a service like Gmail, Dropbox, Google Drive or a device or feature such as Android Device, Android SMS or iOS Photos.

Once you have selected a channel, Gmail for example, you are asked to select the trigger. For Gmail, this can be a new email, a new attachment, new email from an address you specify, a new starred email, a new labeled email, or new email from search.

Once you have made the selection, you are asked to enter additional information if required. None is required if you select "a new email" for example, but if you select "a new labeled email", you are asked to enter that label there.

The "That" part defines the action which is what you want to be run when the "This" part is triggered. Here you select a device or service again, say Dropbox, and select one of the available actions that you want performed.

Create the recipe

ifttt recipe

To create the recipe on IFTTT, do the following:

  • Click on the create button at the top.
  • Here you click on this which is underlined.
  • Select Gmail from the list of trigger channels.
  • Select "new email labeled" as the trigger.
  • Enter the label name on the trigger fields page and click create trigger.
  • Select that on the next page.
  • Pick an online storage provider. IFTTT supports Google Drive, Dropbox, Box and OneDrive.
  • Select the action "Add file from url".
  • IFTTT fills out the information automatically. You can change the folder path where those files are transferred to however.
  • Click create recipe on the overview page to complete the process. Here you find the rule in written form which can be useful to spot errors before you create it.

Closing Words

The new rule is live the moment it is created. I suggest you send a test message to the email address in question to make sure everything is set up correctly. If it is not, go back and modify the recipe or the filter on Gmail to correct the issue.

Note that you need to authorize IFTTT to access Gmail and the cloud storage provider that you have selected.

What you may need to do in addition is notify other users about this, and maybe share the folder on the file hosting service with others as well if that is desired.

Summary
Article Name
Transfer select Gmail attachments automatically to file hosting providers
Author
Description
How to transfer specific attachments sent to Gmail to a file hosting provider automatically.
Please share this article

facebooktwittergoogle_plusredditlinkedinmail

Advertisement

Responses to How to upload select Gmail attachments automatically to cloud storage

  1. Joe April 30, 2014 at 6:26 pm #

    A major concern that you didn't mention: what if two people use the same filename? I assume this will simply overwrite the earlier file, rather than adding an incremental number or using some other method to avoid overwriting.

    To avoid that, you have to "add ingredients" using the big blue plus sign in the "File Name" area when setting up the Dropbox section of the recipe. I had mine use sender address, time received, AND file name (in case someone sends the same filename twice and I want both copies, which could happen if they use some boilerplate name like "NewDocument1").

    • Martin Brinkmann April 30, 2014 at 6:52 pm #

      Is not Dropbox using copies of files automatically in this case? But good point, need to investigate this.

    • Martin Brinkmann April 30, 2014 at 11:55 pm #

      I have tested it, only on Google Drive but still. Same name attachments are stored as well. You end up with several same name files in the same folder structure but that is okay I guess.

  2. Blue May 1, 2014 at 7:03 pm #

    They are poor variations of cloud storage (Google Drive, Dropbox or Microsoft's OneDrive.) because they have specific limitations which do not make them idea as a cloud storage even for personal use. They don't allow executable files (EXE, COM, BAT) to be uploaded or saved on their servers. I have purchase a few programs from online sources and want to save them in a cloud for easy access on the go. "Google Drive, Dropbox or Microsoft's OneDrive.", do not allow executable files so aren't really a good choice for cloud storage or drop box option.

    So MediaFire or Firedrive to the rescue. Both allow executable files uploaded, saved and shared (Mediafire checks copyrights of the files shared). Plus for programmers, who need to allow a few individuals to download a specific file or folder to beta test a program, Mediafire and Firedrive are great resources. Firedrive allows online chat and messaging between Dropbox and shared file users. But as they are based in UK their download speed is not consistent for all Canada/USA users.

    • Joe May 1, 2014 at 10:31 pm #

      I've never seen that limitation on Dropbox - I've been storing dozens of .exe and .bat files there for years. I thought maybe you were referring only to the web uploader (I never use it - my files are all uploaded from synchronized folders), but I just tested it and it works. Maybe you should give Dropbox another look.

  3. Joe May 1, 2014 at 10:53 pm #

    Another limitation: it apparently can only pull in one attachment. I usually wouldn't have a use for this, but right now I am accepting job applications via email, so I was excited to try it out. I've received two so far, and both used multiple attachments for cover letter, resume, and references. In both cases, only one attachment made it into Dropbox. The recipe "ingredient" in IFTTT is "FirstAttachmentPrivateURL", and there are no options other than "First...".

    Of course, if you are asking people to send attachments, you could always specify to include just one file per email.

Leave a Reply