0

I have classic email templates in Production that I'd like to easily retrieve and deploy into Sandbox via sfdx force:source:retrieve and sfdx force:source:deploy commands.

I've tried

sfdx force:source:retrieve -m EmailTemplate -u MyProductionOrg

...with "No results found". I thought I would need the Folder so I tried

sfdx force:source:retrieve -m Folder -u MyProductionOrg

...which didn't get any results either.

How am I supposed to retrieve these metadata types? Not sure what I'm missing here

1

Can you please try below command to retrieve email template

sfdx force:source:retrieve -m EmailTemplate:Custom_Template/Claim_Notification

Here Custom_Template is folder API name and Claim_Notification is the email template name. Whenever we retrieve email template they must be retrieved the folder path must be mentioned and same goes for deployment

sfdx force:source:deploy --sourcepath c:\Users\...\force-app\main\default\email\Custom_Template\Claim_Notification.email --json --loglevel fatal

While deploying it should be the path where your email template is physically located. However make sure the folder already exists in your org with the same name before deploying.

  • Perfert. Spelling out the full EmailTemplate:Template_Folder/Email_Template_Developer_Name worked. Note that just EmailTemplate:Template_Folder did not bring down every email template within that Template_Folder, so it seems you have to specify the exact email template that you'd like to pluck – Brian Miller Sep 8 '20 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.