How to display screenshots using "HTML Doc from Template" smart service?

we have an application that scans incoming email in a mail account and creates a process. We use "HTML Doc from Template" smart service to display the email body in HTML format. A link to generated HTML document is available in process dashboard.

However, the HTML document doesn't display screenshots within e-mail body. Sample HTML document attached ..

how to display screenshots using "HTML Doc from Template" smart service (or) any other ideas ? Thanks
...

Email_with_Screenshot.docx

OriginalPostID-104758

OriginalPostID-104758

  Discussion posts and replies are publicly visible

Parents
  • 1. If you have the images stored as a documents in Appian then adding them to an HTML template is possible. Here is a sample application forum.appian.com/.../85010 You need to have the Base64 Utilities Plug-in available for download here in Appian Forum under the "Shared Components" section (forum.appian.com/.../components)- Expression Functions - View All Expression Functions.

    To test the example just run a new instance, pass an image and a text in the start form and a new task will let you download the resulting document. If you review the template you will see the trick is in the <img> tag:

    <img alt="Embedded Image" src="data:image/png;base64,###IMAGE_BASE64###" />

    then I use the HTML Doc From Template to populate the IMAGE_BASE64 key with convertdocumenttobase64(pv!image)


    2. If they are part of the email body and you don't have them as images check why the document shows the red X to have a better understanding of the issue (e.g. they point to an invalid URL or to an inaccessible one)
Reply
  • 1. If you have the images stored as a documents in Appian then adding them to an HTML template is possible. Here is a sample application forum.appian.com/.../85010 You need to have the Base64 Utilities Plug-in available for download here in Appian Forum under the "Shared Components" section (forum.appian.com/.../components)- Expression Functions - View All Expression Functions.

    To test the example just run a new instance, pass an image and a text in the start form and a new task will let you download the resulting document. If you review the template you will see the trick is in the <img> tag:

    <img alt="Embedded Image" src="data:image/png;base64,###IMAGE_BASE64###" />

    then I use the HTML Doc From Template to populate the IMAGE_BASE64 key with convertdocumenttobase64(pv!image)


    2. If they are part of the email body and you don't have them as images check why the document shows the red X to have a better understanding of the issue (e.g. they point to an invalid URL or to an inaccessible one)
Children
No Data