Hi,
I am using send e-mail smart service to send an email notification which is internally using HTML template.
Initially, I have designed a template with few variables using ### and which are working perfect.
Later on I have added few more variables, but these variables are getting replaced with values sometime and sometimes those are not loading.
I have even tried to click the option "Re-Scan Template" and it worked for some time and again after some time it is not working.
Can someone advice on this. Thanks.
Discussion posts and replies are publicly visible
Hi Hari Kishore,
Usually the HTML template will not work properly any time an update is made to that template, to work HTML template properly you need to re-scan the template every time you update the template.
To avoid this situation I would suggest use Appian expression rule to construct your email body. This will give more control to handle you email content, you can use HTML tags to make your content different styles (Ex: Bold, Italic, links, different color etc...) See below for sample code to construct email body in expression rule.
concat( "The is sample text ", "<br>", char(10), "<br>", char(10), "<b>", "Title1: ", "</b>", pv!titleDescription /*your pv to map*/, "<br>" & char(10), "<b>", "Title2: ", "</b>", pv!titleDescription2 /*your pv to map*/, "<br>" & char(10), "<br>" & char(10), "This is end of text", "<br>" & char(10), "<br>" & char(10), "Regards, ", "<br>" & char(10), "Your Sender" )
Thanks for you replying to my post and your suggestion. Let me give a try with your suggestion.
In the case of HTML template with variables ###, even after Re-Scan also it is not working some times.
Also, not sure about any limitations on the number of HTML template parameters, may be due to that reason is not working as expected. My current template is having more than 20 parameters.
Could you please suggest under which option/tab, I can use the expression rule which you have suggested.
It seems to be it is also a not a perfect solution.
I have defined an expression rule along with rule inputs and passed all the required PV variables as parameters to the rule input.
After words, I got the below message.
Is there any perfect and alternative solution for this.
Hi Hari, you need to create an expression rule for email body and call that expression rule here. You won't see that error if you use expression rule
I have defined the expression rule like below attached screen shot and added rule inputs as parameters and I am passing values to these rules inputs while calling the expression rule from Send E-Mail smart service.
I have selected the option called "Enter text here" and selected "Insert an expression" pencil icon and passed pv variable values to the rule input then I am getting below screen.
Let me know if I have to select any option or flow to avoid this issue.
Can someone suggest the solution please. TIA.
Are you able to share your email body code.
Please find the below attached screen shot of email body code.
I have clicked on pencil/pen icon and wrote the code. Once after "SAVE AND CLOSE" button was clicked it was throwing and message which I have stated earlier.
Hi Naresh,
Let me know if you need any further information on this.
Thanks.