How to Download Email Attachments of Specific File Types
The Save Emails addon lets you specify a list of file extensions and only file attachments of the specified extensions will be saved to your Google Drive. You can also specify a ignore list and all files except the ones belonging to specific extension will not be downloaded.
To get started, go to Addons > Save Emails > Create Rule and jump to the Download Emails and Attachments Section.
Select the “Save File Attachments” checkbox. You can also select the Ignore Files dropdown and select a file size (say 10 kb). Any file attachments small than the specified size will not be saved to Google Drive.
This is useful because some emails contact vcards, social profile emails, email signature, etc that are small in size in size and you may skip saving them to your drive.
Next, in the Allowed Extension field, specify one or more file types that should be saved. You need to separate the list of extensions with a comma.
For instance, you could say pdf, doc, docx, ppt, xls, xlsx to download files of Microsoft Office type (no need to add a dot or period before the extension name).
You can put any (or leave the field blank) and files of all types will be downloaded.
Similarly, you can specify a black list to skip download files of particular files. For instance, if you wish to avoid saving video and audio files, you can say mp4, mp3, flac, mov, avi in the Disallowed Extensions list.
Please not that if a Gmail attachment does not contain an extension, it will be ignored. Also, it will not download native Google documents.
Amit Agarwal
Google Developer Expert, Google Cloud Champion
Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.
Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory