Send E-Mail smart service

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

Parents
  • 0
    Certified Lead Developer

    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"
    )

  • 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.

  • 0
    Certified Lead Developer
    in reply to Hari Kishore Reddy

    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

  • Hi,

    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.

Reply
  • Hi,

    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.

Children