I need to add an image stored in folder into the body of an email using the send email node

Certified Associate Developer

Hey everyone! I'm working on an email template which I'll be using inside a Send email node and I have to add a logo as a signature. Because of company requirements, I can't use href HTML attributes and I already tried using inline-css, svgs and base64 versions but those are not viable options due to email provider incompatibility. So the only option left I could think of was the following:

  • Storing the logo inside the Document Folder in Appian.
  • Creating a constant pointing to the logo file which is a PNG.
  • Inside the process model I create a Document type process variable.
  • That pv as a value has the file constant.
  • Inside the Send email node I went to the Setup window an inside the Message body I inserted the logo pv as an expression.  

But the received email doesn't show the image, it only shows the following message. 

Do you know if there's a way to send files that are stored in Appian through the send email node? Also, attached files are not an option because the image needs to be visible in the email body.

Kind regards. 

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Hi you can use cid to achieve that 

    "<img src=""cid:signature.png"" ALT=""xyz image""/>"

    And pass the image as attachment signature.png is the document name here.

  • 0
    Certified Associate Developer
    in reply to ujjwalrathore

    Hey, Ujjwal! Thanks a lot for the help, I tried to implement your solution however I wasn't able to embed the image into the email body. 

    This is the result I get:

    This is the template I made:

    The ### enables Appian to scan those fields an later on replace them with a value. Once Appian scanned the template, I replace the ###logo### field with a constant object that points to the image located in the Document folder in Appian. Later on, I entered the same constant in the attachements expression field. 

    Any thoughts? Maybe I need to store the constant into a pv? I also tried to reference the document creating an expression rule with the document function and using the url parameter. But overall, neither of the attempts have been succesful.

    Kind regards.

Reply
  • 0
    Certified Associate Developer
    in reply to ujjwalrathore

    Hey, Ujjwal! Thanks a lot for the help, I tried to implement your solution however I wasn't able to embed the image into the email body. 

    This is the result I get:

    This is the template I made:

    The ### enables Appian to scan those fields an later on replace them with a value. Once Appian scanned the template, I replace the ###logo### field with a constant object that points to the image located in the Document folder in Appian. Later on, I entered the same constant in the attachements expression field. 

    Any thoughts? Maybe I need to store the constant into a pv? I also tried to reference the document creating an expression rule with the document function and using the url parameter. But overall, neither of the attempts have been succesful.

    Kind regards.

Children