We have some email templates in our email templates folder, but I'm not sure where they are being accessed or used. How do I investigate this?

I looked into the emailTemplate table, but it didn't provide any relevant information.


  • What if you uncheck Available for use and try and save it? Apr 18, 2013 at 20:20

5 Answers 5

  1. URL hack the "show dependencies" button available for example on Apex classes. https://instance.salesforce.com/packaging/dependencyPage.apexp?id=... - you can paste class id, page id, email template id... Good for initial reconnaissance. Probably you can achieve similar results while building a fake changeset and clicking show/add dependencies. It's not a 100% solution though.
  2. Try to delete it in sandbox and watch the fireworks ;)
  3. If delete has finished successfully - run all tests?


Static analysis (workflows email alerts listview, Eclipse search etc) will get you only so far. Templates can be referenced via Name, DeveloperName, Id and even if you'd cover all of these it's still not 100% foolproof as I've seen template Ids stored within custom settings or labels...

In the end - you know your codebase best :/

  • 1
    I tried deleting the template in sandbox and no fireworks happened =(. The sneaky developer placed the additional cc emails in custom settings /facepalm
    – compski
    Jun 25, 2020 at 7:01

If you only want to check Workflow Rules' Email Alerts, you can create a new view in

Setup --> Create --> Workflow & Approvals --> Email Alerts

with Email Template Name equals Value.

However, as aforementioned, the assumption is that Email Templates are only used in Workflow Rules' Email Alerts. Moreover, you have to create separate views for each Email Template you want to track.


You can use Salesforce Happy Soup, which provides 100% free Salesforce Impact Analysis. Happy Soup will tell you which email alerts are using your template, as well as which apex classes are using SOQL against the EmailTemplate object.


PS: I'm the creator/owner of happysoup.io and I'm not trying to sell you anything. As stated above happy soup is FREE

  • I don't have enough points to reply to or up a comment.. but Pablo with his happysoup.io is brilliant. I have used this before and will be using it now for the same task in the header. It is an amazing tool for impact analysis (at least). And oh yes, it is totally free to use.
    – aamir2910
    Apr 17 at 11:10

I wish there was a better way to do this, however @Suman's answer did help as I was able to determine that the email template is used in APEX code and not Workflows.


You can try the Appexchange app Satrang Metadata Search, which will help you to do an Advanced Search on components like Flows, Process Builders, Apex Classes, Lightning Components, and Apex Triggers, etc. with your respective keyword, which can be the name of your email template, and you will get your desired results.

Here's the link: https://appexchange.salesforce.com/appxListingDetail?listingId=a0N30000009wgF7EAI

Disclaimer: I work at Satrang Technologies, the publisher of this Satrang Metadata Search AppExchange App.

You must log in to answer this question.

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