How to Rename Gmail Emails and File Attachments

The premium version of Save Emails offers an easy option to rename file attachments and email messages when the are downloaded to your Google Drive for archiving.

For instance, if the attachment name is “resume.pdf”, you can write a rule that will rename that attachment to, say, “Jan-20-2017 Angus McDonald resume.pdf” where Jan-20 is the date of the email message and Angus is the name of the sender.

Open your Google Spreadsheet, go to Addons > Save Emails > Create Rule (or modify an existing rule) and go to the download section as shown below:


Similar to Mail Merge, you use variable name enclosed in double curly braces.

For instance, if you need to include the name of the sender and the message’s subject in the saved email, you set the File name as {{Subject}} {{Sender}}. Email messages are downloaded in PDF format and the .pdf extension will be added to the name automatically.

For attachments, you can use {{AttachmentName}} (no spaces) to have the saved file name exactly as the original file. Or use the following format to set the name depending on the date of the message.

{{Year}}-{{Month}} {{Sender}}.{{AttachmentType}}

Here’s a complete list of variables that you can use while setting the name of emails and file attachments with save emails.

VariableDescription / Example
AttachmentNameOriginal file name (e.g. resume.pdf)
AttachmentBaseBase name of the file (e.g., resume)
AttachmentTypeFile extension or format (e.g., pdf)
MessageIdEmail Message Id
ThreadIdEmail Thread Id
Date (format can be customized)Message Date (e.g., 26-Feb-2017)
Day26 (dd)
DayNameWed (EEE)
DayNameFullWednesday (EEEEE)
WeekWeek Number (ww)
MonthFeb (MMM)
MonthNumber02 (MM)
MonthNameFebruary (MMMMM)
Year2017 (YYYY)
SenderSender’s Name (from the From field)
RecipientRecipients Name (from the To field)
SubjectEmail Subject