We've created first version of our unlocked 2gp package. Bunch of custom email templates have been packaged as a part of unfiled$public folder (including MyCustomPackagedEmailTemplate one).

Now when we are trying to install this package in an empty sandbox, it throws the following error: MyCustomPackagedEmailTemplate file is located in both the package you tried to install, and in either the unfiled-public folder or a user folder in this org. To install this package, either delete MyCustomPackagedEmailTemplate from this org, or move it to a different folder.

But there is no single email template in this sandbox at all - the error message doesn't make a lot of sense. Has anyone faced with something like? Any help would be appreciated.

1 Answer 1


Do the following

Folder Creation

The metadata for the folder should be as follows

<?xml version="1.0" encoding="UTF-8"?>
<EmailFolder xmlns="http://soap.sforce.com/2006/04/metadata">

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .