Simple Hack to Instantly Send your Gmail Attachments to Google Drive
Have you ever tried sending your gmail attachments to Google drive automatically ? If not, then try this simple hack. I think everyone is familiar with new Google Drive which is one such amazing drive to store all your data in it. You can access your data from any part of the world if you upload some data into your Google Drive. With Google Drive, you are on the web, in your home, at the office and on the go. So wherever you are, your stuff is just there. You can share you data with your friends in any part of the world. Google Drive offers you 5 GB free drive to store all your data. Google Drive launched with one missing feature in it. Its the ability to save your Gmail attachments directly to your Google Drive account. Which means, when ever you have any attachment in your Gmail account, the attachments getting transferred to your Google Drive automatically.
This is not possible with the default Google Drive options, But still you can hack it with a small code give by Amit Agarwal who blogs at Labnol.org. Thanks to him for this amazing trick where your gmail attachments will automatically be saved to your Google Drive. So when ever you have any important attachment, you no need to save to your Desktop PC/Laptop or any other external device to keep it safe. You can actually save it in your free 5GB online Google Drive account. Imagine if you reading a Gmail message on your mobile accessing a mail. It had an attachment which has to be saved immediately. Well, this is really easy now, you have to just apply a Google Drive label to your message and it will appear in your Google Drive account. Google Drive will automatically synchronize with your desktop folders and save the attachments in your local disk in just few minutes. Later you can access the file either online or offline from any part of the world.
So, going into the details of this hack, you have to just create a small document in your Google Drive which can save all your attachments from Gmail account. You no need to install any extensions or addons. Just follow this simple technique which will work fine in the web and mobile version of Gmail. Including any of your Gmail apps that support labels.
Initializing and Running the Script to Send Gmail Attachments to Google Drive:
So, if you want to have a similar setup for your Gmail account and Google Drive, all you have to do is to follow these simple steps given below.
1) Login to your Google Account, and create a copy of this sheet in your Google Docs (Google Drive). As soon as your open that document, You will be asked to Make a new Copy of this document ? Click on Yes, make a copy. Then you can see a interface like below screenshot.
2) Now click on Initialize and grant the necessary permissions. You can check out the below screenshot.
3) If you feel your account is not secured and don’t want to take a risk of someone’s else code, Here is the actual code used in the sheet. You usually wont share your Google credentials or data with anyone else. But for your satisfaction, we have just mentioned the source code of the above script.
4) Next go to the Gmail menu again and select Run. As shown the above screenshot with a red mark arrow. After running the script, close your Google sheet and you are done.
Gmail Attachments to Google Drive: Behind the Scene
Its very simple, The program works very logically, The Google sheet will monitor your Gmail mailbox in the background for every 2 minutes and as soon as it finds any message that has a label Google Drive, it will automatically save all the attachments int hat message to the Gmail folder on your actual Google Drive.
So, when all the above setup is ready, you have to just apply the label Google Drive to any of your email messages in Gmail. The attached files will be available in your drive (both online and offline) in the next few seconds. And if you get any errors like “Service invoked too many times,” just increase the trigger duration. You can open the same sheet in Google Docs, go to Tools –> Script Editor and then choose Resources –> Current Script Triggers. Now change the value of minutes timer from “Every 5 minutes” to “Every 15 minutes”. If you would like to stop the script from running in the background, go to the same trigger screen and simple delete the “SendToGoogleDrive” time trigger.
How to label your Gmail Messages:
1) Login to your Google Account and go to Gmail and go to your inbox. Click on any mail which have a attachments to save those attachments in your Google drive.
2) So. whenever you label your mails as Google Drive, the attachments(if any) will be automatically synchronized into your Google Drive account. Check out the below screenshot to check the file thememin (730 kb) in Google Drive (which you can see in the above screenshot).
With this simple hack, you can all your attachments into your drive automatically. Your attachments will be more secured and no need to upload them specifically. You can always leave a comment below if you any queries on this simple hack on how to add Gmail attachments to Google Drive automatically.
About The Author
Satish Kumar is the Founder of Pyrite Technologies Private Limited. He is very passionate about writing Technology and Troubleshoot issues in CoolPCTips. He also writes at SEOsiren.com on free search engine traffic strategies.
Satish Coolpctips May 7, 2012
Hi Subhanker, Can you explain me the problem again ? I am still not clear with you query 🙂
Subhanker May 7, 2012
As in the above pic there is an Gmail option but unfortunately when i copy this sheet then no option comes there i dont know why ??
Subhanker May 7, 2012
Tried Many times but yet Gmail option doesn’t appear
Satish Coolpctips May 9, 2012
Can you take a screenshot of your issue and send us to email@example.com ? We will try to solve your issue asap. If you have logged in, your account will surely be connected to it. Make sure you are connected with your gmail account first.
Works just fine! An excellent job.
Is it possible to save only the latest attachment if all attachments come with the same name?
Sir the gmail option is not comming only till help appears !!