Loading

Mass change email templates folder with Data Loader

Publiseringsdato: Jan 10, 2024
Beskrivelse

Available in: Salesforce Classic Email Templates only

Data Loader can be used to bulk migrate an email template from one folder to another.

Løsning
 
Warning
Always back up your data before performing any data operation. See Export Backup Data from Salesforce or Export Data for more details. It is recommended to run a test with a small subset of records to ensure the operation was successful through manually opening and verifying that the corresponding records are correct in Salesforce.


To complete the transfer of templates to a different folder:

 

  1. Obtain the ID of the folder that currently contains the email template, and the ID of the folder that you'd like to transfer the email templates to:

To find the folder name: 
  1. Click Setup
  2. Type Email Templates into the Quick Find box and click Classic Email Templates
  3. Choose the folder from the Folder dropdown.
After you've selected the folder, the URL for the page will reflect the folder ID. For example: 00l1P000000iPsB
 
  1. Export the IDs of the templates using the Data Loader 

 
  1. Run Data Loader.
  2. Click on Export.
  3. Log in using your Salesforce credentials.
  4. Select Show all Salesforce Objects.
  5. Choose Email Template (EmailTemplate) on the list.
  6. Click on Next.
Note: Since you now have the folder ID of the template, we can use this to extract the email templates in that folder.
 
  1. On 'Choose the query fields below', select IDFolderID, and any other fields to help identity the templates to be moved.
  2. On 'Create the where clauses to your query below,' create a query that chooses the folder.
Here is an example: 'Fields' is 'FolderID', 'Operation' is 'equals', 'Value' is '00l1P000000iPsB'.
 
  1. Click on Add Condition
As a result, your generated query should look like this: 'Select Id, FolderId FROM EmailTemplate WHERE FolderId = '00l36000000UAH1'
 
  1. Click on Finish.
  2. Click on Yes.
  3. Click on Ok.
Salesforce recommends that you save a copy of the export file to a safe location for backup purposes. 
  1. Edit the result file.

 
  1. Access the result file and change the FolderID column to the ID of the new folder.
  2. Save as a new .csv file. This allows you to retain the original file as a backup.
 
  1. Update the folder using the Data Loader

 
  1. Run Data Loader.
  2. Select Update.
  3. Select Show all Salesforce Objects.
  4. Choose Email Template (EmailTemplate) on the list.
  5. Click on Browse.
  6. Click on Save .csv file.
  7. Click on Next.
  8. Click on Ok.
  9. Select Create or Edit a Map
  10. Click on Auto-Match Fields to Columns.
  11. Click on Ok.
  12. Click on Next.
  13. Browse for the destination folder.
  14. Click Yes and Finish.
 
The process transfers the templates stated on the .csv file to the new folder. If the Data Loader is not yet installed, review:
See also:
Data Recovery Retirement
EmailTemplate
Insert, Update, or Delete Data Using Data Loader.
Knowledge-artikkelnummer

000383681

 
Laster
Salesforce Help | Article