{"id":791,"date":"2020-04-08T17:43:04","date_gmt":"2020-04-08T17:43:04","guid":{"rendered":"https:\/\/gearmage.com\/blog\/?p=791"},"modified":"2026-11-25T20:14:03","modified_gmt":"2026-11-25T20:14:03","slug":"customizing-filenames-or-email-data-using-fields","status":"publish","type":"post","link":"https:\/\/gearmage.com\/blog\/customizing-filenames-or-email-data-using-fields\/","title":{"rendered":"Customizing file names or email data using fields"},"content":{"rendered":"\n<p>Mail Attachment Downloader names the files it saves from <strong>fields<\/strong>: short names in curly braces, such as <code>{SUBJECT}<\/code> or <code>{DATE[yyyy-MM-dd]}<\/code>, that are filled in from each email. This post lists the fields of version 4.0, shows how to change their output, and gives a few examples.<\/p>\n\n<h2>Where you can use fields<\/h2>\n<ul>\n<li><strong>A rule&#8217;s folder and file name<\/strong> (<a href=\"https:\/\/gearmage.com\/buymaildownloader.html#plan-client\">PRO Rules Client<\/a> and <a href=\"https:\/\/gearmage.com\/buymaildownloader.html#plan-server\">PRO Rules Server<\/a>): the <strong>Save folder<\/strong> and <strong>File name<\/strong> boxes of the rule&#8217;s <strong>Save<\/strong> part, in the Rule Editor.<\/li>\n<li><strong>The text of a rule&#8217;s steps<\/strong>: for example the file and columns of <strong>Save metadata<\/strong>, the subject and text of <strong>Send an email<\/strong>, or the file name of <strong>Merge PDFs<\/strong>.<\/li>\n<li><strong>The Parser&#8217;s output<\/strong> (<a href=\"https:\/\/gearmage.com\/buymaildownloader.html#plan-parser\">PRO Parser<\/a> and up): its folder and file name can use the values the Parser reads, such as <code>{SUPPLIER}\\{INVOICE_NUMBER}_{FILENAME}{EXT}<\/code>. See <a href=\"https:\/\/gearmage.com\/maildownloader_pro_features.html#filename-format\">folders and file names<\/a>.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/gearmage.com\/buymaildownloader.html#plan-free\">The Free edition<\/a> and <a href=\"https:\/\/gearmage.com\/buymaildownloader.html#plan-backup\">PRO Backup<\/a> name files with tick boxes instead: on the <strong>Account rule<\/strong> tab, the <strong>Folders and file names<\/strong> page has <strong>Saved file name<\/strong> with <strong>Filename<\/strong>, <strong>From<\/strong>, <strong>Subject<\/strong>, <strong>Date<\/strong> and <strong>ID, to make each name unique<\/strong>.<\/p>\n\n<h2>How to open the field list<\/h2>\n<p>Click the <strong>Fields&#8230;<\/strong> button next to a box. The <strong>Fields<\/strong> window lists each field, what it holds, and its value for a sample email. Type in the search box (for example &#8220;date&#8221; or &#8220;sender&#8221;) to find a field, then click <strong>Insert<\/strong> to put it where the cursor is. <strong>Fields: help<\/strong> explains more.<\/p>\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/gearmage.com\/assets\/images\/4.0-fields-window.jpg?w=840&#038;ssl=1\" alt=\"The Fields window open under a rule's File name box: a search box, the columns Field, Holds and For a sample email, {EMAIL_FROM} selected and the Insert button\"><figcaption>Fields&#8230;: every field the box can use, with its value for a sample email.<\/figcaption><\/figure>\n<p>The list only offers the fields that make sense in that box. A rule&#8217;s <strong>File name<\/strong> can&#8217;t use the saved file&#8217;s own fields, such as <code>{SAVE_PATH}<\/code>, because the file isn&#8217;t saved yet.<\/p>\n\n<h2>The default file name: {FILENAME}_{ID}{EXT}<\/h2>\n<p>A new rule starts with this file name:<\/p>\n<p><code>{FILENAME}_{ID}{EXT}<\/code><\/p>\n<ul>\n<li><code>{FILENAME}<\/code>: the file&#8217;s name, without its extension.<\/li>\n<li><code>{ID}<\/code>: the message&#8217;s ID with the part number, so each file&#8217;s name is different.<\/li>\n<li><code>{EXT}<\/code>: the file&#8217;s extension, with the dot, such as <code>.pdf<\/code>.<\/li>\n<\/ul>\n<p>So invoice.pdf is saved as something like invoice_00000_1.2.pdf. Keep <code>{ID}<\/code> in your file names: two emails often send files with the same name (invoice.pdf, scan.pdf), and <code>{ID}<\/code> keeps them apart. Use <code>{FILENAMEEXT}<\/code> for the name with its extension, but not together with <code>{FILENAME}<\/code> and <code>{EXT}<\/code>, or part of the name comes twice.<\/p>\n\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/gearmage.com\/assets\/images\/4.0-what-to-save.jpg?w=840&#038;ssl=1\" alt=\"The Save part of a rule with the default file name {FILENAME}_{ID}{EXT} and an example of the saved file's path below it\"><figcaption>A new rule&#8217;s file name, with an example of the result below the box.<\/figcaption><\/figure>\n\n<h2>The fields<\/h2>\n<h3>The email<\/h3>\n<ul>\n<li><code>{FROM}<\/code>, <code>{TO}<\/code>, <code>{CC}<\/code>: who sent it, who it was sent to and copied to, with the names.<\/li>\n<li><code>{EMAIL_FROM}<\/code>, <code>{EMAIL_TO}<\/code>, <code>{EMAIL_CC}<\/code>: the addresses only (several are separated by commas).<\/li>\n<li><code>{SUBJECT}<\/code>: the subject.<\/li>\n<li><code>{IMPORTANCE}<\/code>: HIGH, NORMAL or LOW.<\/li>\n<li><code>{EMAIL_HEADER[...]}<\/code>: any header of the email (more below).<\/li>\n<li><code>{MESSAGE_ID}<\/code>: the message&#8217;s ID, without the part number.<\/li>\n<li><code>{ATTACHMENT_COUNT}<\/code>: how many attachments the email has.<\/li>\n<\/ul>\n<h3>Dates<\/h3>\n<ul>\n<li><code>{DATE}<\/code>, <code>{DATE_LOCAL}<\/code>, <code>{DATE_UTC}<\/code>: the email&#8217;s date as the email has it, in this computer&#8217;s time, or in UTC.<\/li>\n<li><code>{PROCESSED_DATE[...]}<\/code>, <code>{PROCESSED_DATE_LOCAL[...]}<\/code>, <code>{PROCESSED_DATE_UTC[...]}<\/code>: when the email was processed.<\/li>\n<\/ul>\n<h3>The file<\/h3>\n<ul>\n<li><code>{FILENAME}<\/code>, <code>{EXT}<\/code>, <code>{FILENAMEEXT}<\/code>: the file&#8217;s name, its extension, and both.<\/li>\n<li><code>{ID}<\/code>: the message&#8217;s ID with the part number. <code>{IDS}<\/code> is the same, but filled even when <code>{ID}<\/code> is already in the name (then <code>{ID}<\/code> is empty).<\/li>\n<li><code>{PART_NUM}<\/code>: the part number of the attachment or the body.<\/li>\n<\/ul>\n<h3>The account and folder<\/h3>\n<ul>\n<li><code>{ACCOUNT_EMAIL}<\/code>: the account it was downloaded from.<\/li>\n<li><code>{MAILBOX_FOLDER}<\/code>: the mailbox folder&#8217;s full path. <code>{MAILBOX_SUB_FOLDER}<\/code>: the folder&#8217;s own name, without its path.<\/li>\n<li><code>{ACCOUNT_FOLDER}<\/code>, <code>{ACCOUNT_MAILBOX}<\/code>: the folder&#8217;s path in the account, and the mailbox (a shared mailbox or group for Exchange).<\/li>\n<\/ul>\n<h3>Only in steps<\/h3>\n<ul>\n<li><code>{SAVE_PATH}<\/code>, <code>{SAVE_FILE}<\/code>: the folder the file was saved in, and its full path and name.<\/li>\n<li><code>{OFILENAME}<\/code>, <code>{OEXT}<\/code>, <code>{OFILENAMEEXT}<\/code>: the attachment&#8217;s name as it was sent.<\/li>\n<li><code>{CLOUD_URL}<\/code>, <code>{CLOUD_PATH}<\/code>, <code>{CLOUD_FILENAME}<\/code>: for the steps under <strong>Upload to cloud<\/strong>: where the file went.<\/li>\n<li><code>{EMAIL_BODY}<\/code>, <code>{EMAIL_BODY_HTML}<\/code>, <code>{EMAIL_BODY_SOURCE}<\/code>: the email&#8217;s text or HTML, in boxes such as an email&#8217;s text, a web hook or an AI prompt.<\/li>\n<li><code>{ERROR_MESSAGE}<\/code>: the error, in the steps under <strong>If something fails<\/strong>.<\/li>\n<\/ul>\n<h3>Your own fields<\/h3>\n<p>Values a rule finds under <strong>Fields to find<\/strong>, or the Parser reads, become fields too, such as <code>{INVOICE_NUMBER}<\/code> or <code>{ORDER_ID}<\/code>. They show at the end of the field list. See <a href=\"https:\/\/gearmage.com\/blog\/extract-data-emails-attachments\/\">extract data from emails and attachments<\/a>.<\/p>\n\n<h2>Customizing a field&#8217;s output<\/h2>\n<p>Most fields are simply filled in. A few take a setting in square brackets.<\/p>\n\n<h3>Date formats: DATE, DATE_LOCAL, DATE_UTC and PROCESSED_DATE<\/h3>\n<p>Put a format in square brackets. For example <code>{DATE[yyyy-MM-dd]}<\/code> gives 2026-04-23: the date only, without hours, minutes and seconds. <code>{DATE_LOCAL[yyyy-MM]}<\/code> gives the year and month in this computer&#8217;s time. The formats are .NET&#8217;s <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/standard\/base-types\/custom-date-and-time-format-strings\">custom date and time formats<\/a>.<\/p>\n<p>For a folder for each year with a folder for each month inside, put two date fields with a <code>\\<\/code> between them: <code>{DATE_LOCAL[yyyy]}\\{DATE_LOCAL[MM]}<\/code> gives 2026\\04. A <code>\\<\/code> inside the square brackets doesn&#8217;t make folders.<\/p>\n<p><code>{DATE}<\/code> without a format is the date as the email has it, with commas, colons and the time zone. In names, prefer a format.<\/p>\n\n<h3>EMAIL_HEADER[&#8230;]<\/h3>\n<p>Put the header&#8217;s name in the square brackets: <code>{EMAIL_HEADER[message-id]}<\/code>, or a header your supplier adds, such as <code>{EMAIL_HEADER[X-Invoice-Number]}<\/code>.<\/p>\n\n<h3>ATTACHMENT_COUNT[&#8216;.pdf&#8217; OR &#8216;.xml&#8217;]<\/h3>\n<p>Counts only the attachments whose names match, such as <code>{ATTACHMENT_COUNT['.pdf' OR '.xml']}<\/code>. Add the extensions or names you need. To pick emails by the number of attachments, use a condition instead: <strong>More attachments than<\/strong> or <strong>Fewer attachments than<\/strong>, with <strong>Counting only files named:<\/strong>. Conditions don&#8217;t fill in fields: they match the text as you type it.<\/p>\n\n<h2>What a name can&#8217;t hold<\/h2>\n<p>In folder and file names, a field&#8217;s value is cleaned up to make a valid name: <code>\\<\/code> and <code>:<\/code> become <code>_<\/code>, <code>\/<\/code> becomes <code>-<\/code>, and <code>\" ? * | #<\/code> are left out. Only a <code>\\<\/code> you type makes folders, and so do the folder fields: <code>{SAVE_PATH}<\/code>, <code>{SAVE_FILE}<\/code>, <code>{MAILBOX_FOLDER}<\/code>, <code>{ACCOUNT_FOLDER}<\/code> and <code>{ACCOUNT_MAILBOX}<\/code>.<\/p>\n<p>Everywhere else (a database, a CSV file, an email, a web hook or an AI prompt) fields are filled in exactly as the email has them.<\/p>\n\n<h2>Examples<\/h2>\n<h3>Example 1: a daily log of all files saved<\/h3>\n<p>Want a CSV file each day that lists the files saved and the emails they came from? Add a <strong>Save metadata<\/strong> step under <strong>Then<\/strong> (<a href=\"https:\/\/gearmage.com\/buymaildownloader.html#plan-client\">PRO Rules Client<\/a> and up):<\/p>\n<ul>\n<li><strong>File:<\/strong> <code>\\\\fileserver\\Finance\\Logs\\{PROCESSED_DATE_LOCAL[yyyy-MM-dd]}.csv<\/code>. The date has the day only, so every file saved that day goes into the same CSV.<\/li>\n<li><strong>Columns:<\/strong> for example <code>{FILENAMEEXT},{EMAIL_FROM},{SUBJECT},{DATE[yyyy-MM-dd]}<\/code>.<\/li>\n<li>Tick <strong>Add to the file when it is there (otherwise replace it)<\/strong>.<\/li>\n<\/ul>\n<p>The next day starts a new file. Put the same step in each rule whose files you want in the log.<\/p>\n\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/gearmage.com\/assets\/images\/4.0-csv-log.jpg?w=840&#038;ssl=1\" alt=\"A Save metadata step in the Rule Editor with a File box, Columns built from fields, and Add to the file when it is there ticked\"><figcaption>The Save metadata step: a file name and columns built from fields. Put a date in the file name to start a new log each day.<\/figcaption><\/figure>\n\n<h3>Example 2: a folder for each month, files named by sender<\/h3>\n<ul>\n<li><strong>Save folder:<\/strong> <code>\\\\fileserver\\Finance\\Invoices\\{DATE_LOCAL[yyyy]}\\{DATE_LOCAL[MM]}<\/code><\/li>\n<li><strong>File name:<\/strong> <code>{EMAIL_FROM}_{FILENAME}_{ID}{EXT}<\/code><\/li>\n<\/ul>\n<p>An invoice from ap@acme.example received in April 2026 is saved in <code>\\\\fileserver\\Finance\\Invoices\\2026\\04<\/code>, with the sender&#8217;s address at the start of its name.<\/p>\n\n<h3>Example 3: merge an email&#8217;s PDFs into one<\/h3>\n<p>The <strong>Merge PDFs<\/strong> step (<a href=\"https:\/\/gearmage.com\/buymaildownloader.html#plan-server\">PRO Rules Server<\/a>) joins an email&#8217;s saved PDF files into one, with a <strong>File name<\/strong> built from fields, such as <code>{SAVE_PATH}\\{DATE[yyyy-MM-dd]}_{SUBJECT}_{ID}.pdf<\/code>: one PDF for each email, in the folder its files were saved in. Start the name with <code>{SAVE_PATH}\\<\/code>, so the PDF goes there. Emails of the same download that get the same name are joined into one file. A merged file from an earlier download is replaced, not added to, so processing the same emails again gives the same PDF.<\/p>\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/gearmage.com\/assets\/images\/4.0-merge-pdfs.jpg?w=840&#038;ssl=1\" alt=\"The Rule Editor with a Merge PDFs step that joins the email's saved PDF files into one, named from the date, the subject and the ID\"><figcaption>A Merge PDFs step, with a file name built from fields.<\/figcaption><\/figure>\n\n<p><strong>Try it:<\/strong> <a href=\"https:\/\/gearmage.com\/maildownloader.html\">download Mail Attachment Downloader<\/a> and start with <a href=\"https:\/\/gearmage.com\/buymaildownloader.html#plan-free\">the free edition<\/a>, or <a href=\"https:\/\/gearmage.com\/buymaildownloader.html\">compare the PRO editions<\/a>, each with a 30-day money-back guarantee.<\/p>\n\n<h2>Related<\/h2>\n<ul>\n<li><a href=\"https:\/\/gearmage.com\/blog\/save-emails-and-attachments-to-folders\/\">Save emails and attachments to folders: the complete PRO Rules walkthrough<\/a><\/li>\n<li><a href=\"https:\/\/gearmage.com\/maildownloader_pro_features.html#filename-format\">Save many emails into many folders, named your way<\/a><\/li>\n<li><a href=\"https:\/\/gearmage.com\/maildownloader_pro_features.html#csv\">Save email details to CSV<\/a><\/li>\n<li><a href=\"https:\/\/gearmage.com\/blog\/extract-data-emails-attachments\/\">Extract data from emails and attachments<\/a><\/li>\n<li><a href=\"https:\/\/gearmage.com\/pro-parser.html\">PRO Parser<\/a><\/li>\n<li><a href=\"https:\/\/gearmage.com\/buymaildownloader.html\">Plans and prices<\/a><\/li>\n<\/ul>\n<p>Using version 3.x? See the <a href=\"https:\/\/gearmage.com\/blog\/customizing-filenames-or-email-data-using-fields-3x\/\">3.x version of this guide<\/a>.<\/p>\n<p>Questions or suggestions about this post? <a href=\"https:\/\/gearmage.com\/contact.html\">Contact us<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Build folder and file names from email fields such as {FILENAME}, {ID}, the sender and the date, with date formats and examples.<\/p>\n","protected":false},"author":1,"featured_media":1227,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[4,120,6],"tags":[],"class_list":["post-791","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mad","category-pro-rules","category-tips"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Custom file names from email fields - Gearmage Blog<\/title>\n<meta name=\"description\" content=\"Build folder and file names from email fields such as {FILENAME}, {ID}, the sender and the date, with date formats and examples.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gearmage.com\/blog\/customizing-filenames-or-email-data-using-fields\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Custom file names from email fields - Gearmage Blog\" \/>\n<meta property=\"og:description\" content=\"Build folder and file names from email fields such as {FILENAME}, {ID}, the sender and the date, with date formats and examples.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gearmage.com\/blog\/customizing-filenames-or-email-data-using-fields\/\" \/>\n<meta property=\"og:site_name\" content=\"Gearmage Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-08T17:43:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-25T20:14:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/gearmage.com\/blog\/wp-content\/uploads\/2026\/11\/4-0-fields-window.jpg?fit=1400%2C1283&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"1400\" \/>\n\t<meta property=\"og:image:height\" content=\"1283\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"gearmage\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"gearmage\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/customizing-filenames-or-email-data-using-fields\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/customizing-filenames-or-email-data-using-fields\\\/\"},\"author\":{\"name\":\"gearmage\",\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/#\\\/schema\\\/person\\\/c8728645787bff3555b5873b43161652\"},\"headline\":\"Customizing file names or email data using fields\",\"datePublished\":\"2020-04-08T17:43:04+00:00\",\"dateModified\":\"2026-11-25T20:14:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/customizing-filenames-or-email-data-using-fields\\\/\"},\"wordCount\":1269,\"publisher\":{\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/customizing-filenames-or-email-data-using-fields\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/gearmage.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/4-0-fields-window.jpg?fit=1400%2C1283&ssl=1\",\"articleSection\":[\"Mail Attachment Downloader\",\"PRO Rules\",\"Tips\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/customizing-filenames-or-email-data-using-fields\\\/\",\"url\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/customizing-filenames-or-email-data-using-fields\\\/\",\"name\":\"Custom file names from email fields - Gearmage Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/customizing-filenames-or-email-data-using-fields\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/customizing-filenames-or-email-data-using-fields\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/gearmage.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/4-0-fields-window.jpg?fit=1400%2C1283&ssl=1\",\"datePublished\":\"2020-04-08T17:43:04+00:00\",\"dateModified\":\"2026-11-25T20:14:03+00:00\",\"description\":\"Build folder and file names from email fields such as {FILENAME}, {ID}, the sender and the date, with date formats and examples.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/customizing-filenames-or-email-data-using-fields\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gearmage.com\\\/blog\\\/customizing-filenames-or-email-data-using-fields\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/customizing-filenames-or-email-data-using-fields\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/gearmage.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/4-0-fields-window.jpg?fit=1400%2C1283&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/gearmage.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/4-0-fields-window.jpg?fit=1400%2C1283&ssl=1\",\"width\":1400,\"height\":1283,\"caption\":\"The Fields window open under a rule's File name box: a search box, the columns Field, Holds and For a sample email, {EMAIL_FROM} selected and the Insert button\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/customizing-filenames-or-email-data-using-fields\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Customizing file names or email data using fields\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/\",\"name\":\"Gearmage Blog\",\"description\":\"Email Processing Tools and Solutions\",\"publisher\":{\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/#organization\",\"name\":\"Gearmage\",\"url\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/gearmage.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/02\\\/cropped-cropped-GearMage.jpg?fit=240%2C58&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/gearmage.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/02\\\/cropped-cropped-GearMage.jpg?fit=240%2C58&ssl=1\",\"width\":240,\"height\":58,\"caption\":\"Gearmage\"},\"image\":{\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/gearmage.com\\\/blog\\\/#\\\/schema\\\/person\\\/c8728645787bff3555b5873b43161652\",\"name\":\"gearmage\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ca0fad01f9a63241bc21d4f1f44befe7c62e4ee3bb268fb1adaadc2e49ed0699?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ca0fad01f9a63241bc21d4f1f44befe7c62e4ee3bb268fb1adaadc2e49ed0699?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ca0fad01f9a63241bc21d4f1f44befe7c62e4ee3bb268fb1adaadc2e49ed0699?s=96&d=mm&r=g\",\"caption\":\"gearmage\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Custom file names from email fields - Gearmage Blog","description":"Build folder and file names from email fields such as {FILENAME}, {ID}, the sender and the date, with date formats and examples.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gearmage.com\/blog\/customizing-filenames-or-email-data-using-fields\/","og_locale":"en_US","og_type":"article","og_title":"Custom file names from email fields - Gearmage Blog","og_description":"Build folder and file names from email fields such as {FILENAME}, {ID}, the sender and the date, with date formats and examples.","og_url":"https:\/\/gearmage.com\/blog\/customizing-filenames-or-email-data-using-fields\/","og_site_name":"Gearmage Blog","article_published_time":"2020-04-08T17:43:04+00:00","article_modified_time":"2026-11-25T20:14:03+00:00","og_image":[{"width":1400,"height":1283,"url":"https:\/\/i0.wp.com\/gearmage.com\/blog\/wp-content\/uploads\/2026\/11\/4-0-fields-window.jpg?fit=1400%2C1283&ssl=1","type":"image\/jpeg"}],"author":"gearmage","twitter_card":"summary_large_image","twitter_misc":{"Written by":"gearmage","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/gearmage.com\/blog\/customizing-filenames-or-email-data-using-fields\/#article","isPartOf":{"@id":"https:\/\/gearmage.com\/blog\/customizing-filenames-or-email-data-using-fields\/"},"author":{"name":"gearmage","@id":"https:\/\/gearmage.com\/blog\/#\/schema\/person\/c8728645787bff3555b5873b43161652"},"headline":"Customizing file names or email data using fields","datePublished":"2020-04-08T17:43:04+00:00","dateModified":"2026-11-25T20:14:03+00:00","mainEntityOfPage":{"@id":"https:\/\/gearmage.com\/blog\/customizing-filenames-or-email-data-using-fields\/"},"wordCount":1269,"publisher":{"@id":"https:\/\/gearmage.com\/blog\/#organization"},"image":{"@id":"https:\/\/gearmage.com\/blog\/customizing-filenames-or-email-data-using-fields\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/gearmage.com\/blog\/wp-content\/uploads\/2026\/11\/4-0-fields-window.jpg?fit=1400%2C1283&ssl=1","articleSection":["Mail Attachment Downloader","PRO Rules","Tips"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/gearmage.com\/blog\/customizing-filenames-or-email-data-using-fields\/","url":"https:\/\/gearmage.com\/blog\/customizing-filenames-or-email-data-using-fields\/","name":"Custom file names from email fields - Gearmage Blog","isPartOf":{"@id":"https:\/\/gearmage.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/gearmage.com\/blog\/customizing-filenames-or-email-data-using-fields\/#primaryimage"},"image":{"@id":"https:\/\/gearmage.com\/blog\/customizing-filenames-or-email-data-using-fields\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/gearmage.com\/blog\/wp-content\/uploads\/2026\/11\/4-0-fields-window.jpg?fit=1400%2C1283&ssl=1","datePublished":"2020-04-08T17:43:04+00:00","dateModified":"2026-11-25T20:14:03+00:00","description":"Build folder and file names from email fields such as {FILENAME}, {ID}, the sender and the date, with date formats and examples.","breadcrumb":{"@id":"https:\/\/gearmage.com\/blog\/customizing-filenames-or-email-data-using-fields\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gearmage.com\/blog\/customizing-filenames-or-email-data-using-fields\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/gearmage.com\/blog\/customizing-filenames-or-email-data-using-fields\/#primaryimage","url":"https:\/\/i0.wp.com\/gearmage.com\/blog\/wp-content\/uploads\/2026\/11\/4-0-fields-window.jpg?fit=1400%2C1283&ssl=1","contentUrl":"https:\/\/i0.wp.com\/gearmage.com\/blog\/wp-content\/uploads\/2026\/11\/4-0-fields-window.jpg?fit=1400%2C1283&ssl=1","width":1400,"height":1283,"caption":"The Fields window open under a rule's File name box: a search box, the columns Field, Holds and For a sample email, {EMAIL_FROM} selected and the Insert button"},{"@type":"BreadcrumbList","@id":"https:\/\/gearmage.com\/blog\/customizing-filenames-or-email-data-using-fields\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gearmage.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Customizing file names or email data using fields"}]},{"@type":"WebSite","@id":"https:\/\/gearmage.com\/blog\/#website","url":"https:\/\/gearmage.com\/blog\/","name":"Gearmage Blog","description":"Email Processing Tools and Solutions","publisher":{"@id":"https:\/\/gearmage.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gearmage.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/gearmage.com\/blog\/#organization","name":"Gearmage","url":"https:\/\/gearmage.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/gearmage.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/gearmage.com\/blog\/wp-content\/uploads\/2016\/02\/cropped-cropped-GearMage.jpg?fit=240%2C58&ssl=1","contentUrl":"https:\/\/i0.wp.com\/gearmage.com\/blog\/wp-content\/uploads\/2016\/02\/cropped-cropped-GearMage.jpg?fit=240%2C58&ssl=1","width":240,"height":58,"caption":"Gearmage"},"image":{"@id":"https:\/\/gearmage.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/gearmage.com\/blog\/#\/schema\/person\/c8728645787bff3555b5873b43161652","name":"gearmage","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ca0fad01f9a63241bc21d4f1f44befe7c62e4ee3bb268fb1adaadc2e49ed0699?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ca0fad01f9a63241bc21d4f1f44befe7c62e4ee3bb268fb1adaadc2e49ed0699?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ca0fad01f9a63241bc21d4f1f44befe7c62e4ee3bb268fb1adaadc2e49ed0699?s=96&d=mm&r=g","caption":"gearmage"}}]}},"jetpack-related-posts":[],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/gearmage.com\/blog\/wp-content\/uploads\/2026\/11\/4-0-fields-window.jpg?fit=1400%2C1283&ssl=1","_links":{"self":[{"href":"https:\/\/gearmage.com\/blog\/wp-json\/wp\/v2\/posts\/791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gearmage.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gearmage.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gearmage.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gearmage.com\/blog\/wp-json\/wp\/v2\/comments?post=791"}],"version-history":[{"count":7,"href":"https:\/\/gearmage.com\/blog\/wp-json\/wp\/v2\/posts\/791\/revisions"}],"predecessor-version":[{"id":1384,"href":"https:\/\/gearmage.com\/blog\/wp-json\/wp\/v2\/posts\/791\/revisions\/1384"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gearmage.com\/blog\/wp-json\/wp\/v2\/media\/1227"}],"wp:attachment":[{"href":"https:\/\/gearmage.com\/blog\/wp-json\/wp\/v2\/media?parent=791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gearmage.com\/blog\/wp-json\/wp\/v2\/categories?post=791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gearmage.com\/blog\/wp-json\/wp\/v2\/tags?post=791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}