Jump to content

Which email templates have been used?


Guest Paul Alexander

Recommended Posts

Guest Paul Alexander

We're looking through our instance and trying to 'cut the fluff' by removing anything which just hasn't been used - so we've run reports to see which PCF's and BPM's aren't connected to anything and removing them. 

We've come to a point where we'd like to do the same with the myriad of email templates, but we can't find a report or a table to search to tell us whether an email template has been sent. 

Is there such a thing anywhere?

 

thanks

Link to comment
Share on other sites

  • 1 year later...
Guest Paul Alexander

Hi @samwoo

I think we gave up in the end and have just ended up having a massive list of email templates. 

Obviously looking to see if a particular email template has been used in any BPM's is easy enough by entering the email ID in the 'search process' function:

 

image.png.e0c723aae3366dea29aaefb6f576c609.png

 

But trying to see which emails are currently associated with BPM's isn't so easy. 

 

Sorry..I know that's not much help at all!! 

 

 

Link to comment
Share on other sites

@all

There is also the option to search and find if a specific template is used in a workflow/process. When editing an email template there is a "Find In Processes" button that will search if the email template is used in any workflow...

image.png

Link to comment
Share on other sites

Hi @Victor,

That's been useful in some cases, but when you need an overall view for example of the Templates, it's not very viable.  We have loads of email templates, of which I presume 90% are not used... so it's quite hard to gauge which ones are in used or not.

@Paul Alexander, @Adrian Simpkins, @HGrigsby - 
I have quickly created a PowerShell function that you might find of use, will extract every single email template used in the BPM.  Feel free to use / fork the code or make any suggestions if you like.

https://github.com/WoodSam90/Hornbill---List-of-Email-Templates-in-Active-BPMs/blob/main/fnc_Get-HB-BPMEmailTemplates.ps1
@Victor - Am I'm allowed to publish my PowerShell function to a public GitHub which contains Hornbill API methods and services? I know of course not to publish any API keys or instance details.

The dependency for the function requires the Hornbill related modules to be set up and the relevant XMLMC related variables to be configured before the function can run.

#===================================================================
# Import relevant modules
#===================================================================
Import-Module "HornbillAPI"
Import-Module "HornbillHelpers"
Import-Module "PSExcel"

#===================================================================
# Enable TLS
#===================================================================
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"

#===================================================================
# Loop through functions folder and import them
#===================================================================
#get-childitem "C:\Scripts\Hornbill\Functions\fnc*" -Recurse | ForEach-Object {. $_.FullName}

#===================================================================
# Set up the credentials to the Hornbill instance
#===================================================================
$hornbill_instanceName   = "<instance name>"
$hornbill_instanceZone   = "eur"
$hornbill_APIKey         = "<api key>"

#===================================================================
# Connect to the Hornbill instance
#===================================================================
Set-HB-Instance -Instance $hornbill_instanceName  -Zone $hornbill_instanceZone  -Key $hornbill_APIKey  -ErrorAction "Stop"
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...