In Gmail, I can attach a file from my google drive.

On the reverse direction, in google drive, can I access the attached files of received emails in gmail? This is useful when I lose access to my gmail account.


2 Answers 2


Short answer

Yes it's possible, but it's required to extend Google Drive to be able to do so.


Users could authorize apps created by themselves and third party apps to access their Gmail mailbox, like a desktop/mobile email client among others, so it's possible that if the user "lose access to his gmail account" on the web, he still be able to access the messages and the attached files to them.

Google Drive is not a third party app, so if the user "lose access to his gmail account" he could not access Google Drive with that account. Besides this, Google Drive doesn't has a built-in feature to access Gmail messages attachments but it could be extended through add-ons and Google Apps Scripts.


Apps connected to your account - Accounts Help
Extend Google Docs, Sheets, and Forms with Apps Script - Docs editors Help


Here's a Google Script that will Gmail attachments to Google Drive. It is bound to a Google Spreadsheet.

var message = GmailApps.getMessageById(messageId);
var att = message.getAttachments();
for (var t in att) {
  • Thanks. what is the programming language, and what is the library being used?
    – Tim
    Jul 14, 2015 at 4:21
  • @Tim This is written in Google Scripts. See source code. Jul 14, 2015 at 4:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.