How can we get name of email templates using API? Can anyone please guide?
How can we get name of email templates using API?
2.2k views Asked by Aastha Mahajan At
1
How can we get name of email templates using API? Can anyone please guide?
Which API. Come on, put bit more effort in your question
You just need to run queries? Email templates are metadata, can be queried in
EmailTemplate
table.SELECT Id, DeveloperName,FolderName,Name,NamespacePrefix FROM EmailTemplate
If you're using Metadata API (retrieving config, deploying classes etc) you need to explicitly list them in the package.xml. If you don't know the names - you can query like above or use listMetadata call. Example if you're using Ant migration tool: https://developer.salesforce.com/docs/atlas.en-us.daas.meta/daas/forcemigrationtool_listmetadata.htm (it'll work per folder)