how to attach dynamic email template in email notification?

rajapoochi
Kilo Explorer

I want to use different email templates for a single notification based on the severity. Basically, if Incident severity = 1, use severity1 template in email notification, if sev =2 , use sev2 template in same email notification.

one notification -> dynamic template based on condition. Is it possible?

5 REPLIES 5

Mike Allen
Mega Sage

There is a field on notifications:



find_real_file.png



Use that from here:



find_real_file.png



And then make you notification fire based on severity:



find_real_file.png


Thank Mike for your reply.



But in this case, i need to create 4 email notification for each severity. that is duplicate notification.



I am looking to create one notification, inside that, based on that severity, use different templates.


Mike Allen
Mega Sage

Theoretically (I have never done it, but it should be possible), you can use notification email scripts.   Create a script that, essentially, says:



if(current.priority == 0){


//do this html


}else if(current.priority == 1){


//do this html


}[...]



Then put that mail script in your notification, like so:



find_real_file.png


Not exactly what i am looking... I am trying to overwrite this template dynamically using code/mail scripttemplate.PNG