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.


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

  • Thanks. Since my gmail account has been locked down, can other apps access my gmail account?
    – Tim
    Jul 13 '15 at 16:40
  • @Tim: Only if you authorized the app before it has been locked down, otherwise you will have to wait until it be unlocked.
    – Rubén
    Jul 13 '15 at 16:55
  • Thanks. any way to communicate with gmail customer service in immediate messages or calls?
    – Tim
    Jul 13 '15 at 17:09
  • @Tim: See webapps.stackexchange.com/questions/80180/…
    – Rubén
    Jul 13 '15 at 17:12

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 '15 at 4:21
  • @Tim This is written in Google Scripts. See source code. Jul 14 '15 at 4:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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