What is the unfiled$public Email Templates Folder Name? (And How to Deploy It)

What is the unfiled$public Email Templates Folder Name? (And How to Deploy It)

Blog Post: Salesforce Secret: What is the unfiled$public Email Templates Folder Name? (And How to Deploy It)

If you’ve ever tried to manage, deploy, or retrieve Salesforce Email Templates, you’ve likely encountered a tricky folder: the one that holds all the “Unfiled Public Email Templates.”

It looks simple in the Salesforce UI, but when you switch to using tools like the Salesforce Metadata API, VS Code, or the ANT Migration Tool, the folder name you see is not what you use. This is a crucial piece of knowledge for any Salesforce Administrator or Developer.

The Mystery Solved: The Unfiled Public Email Templates Folder Name

The actual, underlying name for the Unfiled Public Email Templates folder in Salesforce metadata is: unfiled$public

That’s right, the folder name contains a dollar sign ($) and is all lowercase. This distinct naming convention is how Salesforce differentiates this special folder from user-created folders, ensuring it always remains the default public location for templates that aren’t otherwise organized.


Why Does This Matter? The Developer’s Perspective

Knowing the literal name, , is essential when you’re working with metadata deployment. This includes:

  1. Retrieving/Deploying using the ANT Migration Tool: You must specify the folder and the template’s unique name using the format.
  2. Working with package.xml: The folder name must be used as the prefix for the email template’s member name.
  3. Using the Salesforce CLI (sf project retrieve/deploy) The directory structure and metadata names must accurately reflect this folder name to correctly reference the asset.

For a developer, a missed dollar sign means a failed deployment!


How to Reference in unfiled$public in package.xml?

Here is a practical example showing how to correctly reference an email template named Test_Notification located in the Unfiled Public Email Templates folder within your file for the ANT Migration Tool or other metadata operations:

<types>
    <members>unfiled$public/Test_Notification</members>
    <name>EmailTemplate</name>
</types>

Key Takeaways:

  • <name>EmailTemplate</name>: This is the metadata type for all email templates.
  • <members>: The value here is a combination of the folder name and the template unique name, separated by a forward slash:
unfiled$public/Template_Unique_Name

Summary: Your Quick Reference

Mastering the unfiled$public secret is a small but mighty detail that streamlines your Salesforce development and deployment process. Knowing this saves you the headache of deployment errors and makes you a much more efficient Salesforce Admin or Salesforce Developer. Now go forth and deploy your email templates with confidence! 🚀

Leave a Reply