Instantly Send Any Gmail Attachment To Google Drive


Now that Google Drive has built file storage into your Google account, it’s only natural that you’d like it to play nicely with your other Google apps. With a few tricks, it can — at least with your Gmail account.

Tech blogger Amit Agarwal details how to set up a system in which applying a GoogleDrive label to any email in your Gmail inbox will automatically save its attachment to Google Drive — syncing those files directly to your desktop. Agarwal accomplishes the task using Google’s somewhat underused Apps Script language to make this all work — none of which you actually need to know to set it up. The set-up is actually extremely easy:

  1. Assuming that you are logged in to your Google account, create a copy of this sheet in your Google Docs (now Google Drive).
  2. Open the sheet and you should see a new Gmail menu — click Initialize and grant the necessary permissions. This is your sheet (see source code) and you are not sharing your Google credentials or data with anyone else.
  3. Next go the Gmail menu again and select Run. Close the Google sheet and you are done.

Now whenever you label an email with GoogleDrive, your script (which runs every two minutes) will automatically add any attached files to your Google Drive. Awesome, right?

Now, let’s say you wanted to automatically save every attachment you receive to Google Drive for easy offline access. Just set up a filter for messages that match the has:attachment search and label all matching incoming messages with GoogleDrive. Click this link for a head start on that filter; it should look something like:

If you wanted to download every single attachment in your Gmail account, just tick the checkbox next to “Also apply filter to X matching conversations” before you click the Create filter button.

Send your Gmail Attachments to Google Drive With a Click [Digital Inspiration] [imgclear]


The Cheapest NBN 50 Plans

Here are the cheapest plans available for Australia’s most popular NBN speed tier.

At Lifehacker, we independently select and write about stuff we love and think you'll like too. We have affiliate and advertising partnerships, which means we may collect a share of sales or other compensation from the links on this page. BTW – prices are accurate and items in stock at the time of posting.

Comments


6 responses to “Instantly Send Any Gmail Attachment To Google Drive”

Leave a Reply