Here’s a simple Google Script that will auto-save all image attachments in your Gmail inbox to a folder in your Google Drive. And once the image files are saved from Gmail to Google Drive, you can switch to the Thumbnail view and visually scan your mailbox.
The other advantage of saving your Gmail images attachments in Google Drive is that you search for text inside images since Drive supports optical character recognition or OCR.
Save your Gmail Attachments in Google Drive
The script runs in the background and will automatically extract images from new incoming mail as well as messages that already exist in your Gmail mailbox. Here’s how you can deploy the script in three easy steps:
- Click here and click the “Authorize” button. The script basically needs permissions to scan your Gmail inbox for images and for writing the image files into your Google Drive Folder.
- You’ll be presented with a form. Enter the name of the Google Drive folder where the image attachments should be saved.
- When the script is done saving the attachments of a Gmail message, it will apply a label to that message to indicate that it should not be scanned again. The default name of this label is Processed but you may choose a different name as well.
- Now click the Start button and the script will start working in the background.
Internally, the Google Script will create a new folder called “Gmail Images” in your Google Drive and all images attachments are saved in this folder. Once a message thread has been scanned for attachments in Gmail, a label “Processed” will be applied to that thread so that the script can skip that thread from scanning in the next iteration.
This is an open-source Google Script and none of your data is shared with anyone.
Also, the above script will save every single image attachment from your Gmail to Google Drive. If you would like to selectively save image attachments to Drive, please use the Send to Google Drive program.