We are currently performing extensive email triage on a project and have a need to display the HTML body of the incoming email. The reason plain text is not feasible is that the HTML email body contains information in a tabular format. This information is critical to the user as it contains very specific and relevant information.
Currently, the Document Viewer component does not support the display of HTML documents. The Web Content component is able to display HTML but does not allow this if the source is being served up inline by Appian via a Web API, i.e. "Source may not be an internal Appian source."
We are able to generate a PDF from HTML using the Dynamic Document Generator plugin found on the AppMarket. The translation from HTML to PDF is not perfect however due to "creative" formatting from time to time.
Has anyone else had this or a similar requirement and how did you solve it ( other than using the above mentioned methods )?
Discussion posts and replies are publicly visible
I'm not sure how "officially supported" this method would be, but I noticed several weeks ago that a Web API component can serve up a page that displays arbitrary input HTML as its body, and is pretty easy to do using OOB functionality. This does, of course, carry all the downfalls of displaying HTML directly, which you already mentioned.
I think the "official" supported method would be to use the method you've already tried, i.e. converting to PDF first.
I'm having the same problem here. I was able to export the email body to PDF but it just doesn't look right within the Document Viewer component. Can you please explain how the Web API would work with the input HTML? I've tried multiple things and the Web Content component always returns "Source may not be an internal Appian source"
I wasn't referring to the Web Content field, actually. What you'd do is make a safeLink pointing to the URL of the Web API, and have the API serve back HTML. This can be used to open a new tab and show necessary HTML within it. Obviously, this is quite a bit of a workaround, but could be useful in certain cases.
Hi, what doesn't look right about the document in the viewer component? I will share my template tomorrow if it helps as it is working really well for us at the moment.
Thank you for your response. That is actually a good idea but I already generated a ."eml" document with a link to open the email in a separate window. What I wanted to do was to show a preview of the emails on the screen so users don't need to open multiple windows (similar to an email app or MS Outlook). I'm working on a Contact Center application with email polling, and we generate automated requests based on a lot of emails the users receive daily.
I've been thinking about this use case for years - the closest I've come is one of the solutions discussed here already - either converting to PDF and showing in the document preview window (which fails for my customer onsite due to the weird domain it uses not being whitelisted by their security organization), or showing the HTML manually in a new tab via a link that potentially exposes the document ID. Both are far from perfect.
We can view the PDF on the screen but the formatting is just not right. Since the emails we receive may contain signatures at the end, headers, or bullet-pointed paragraphs, the width of the document can be very large causing the PDF to show extremely small on the screen. Yes, users can zoom in and scroll to the right but it's time consuming and when you are reviewing a lot of emails during the day this is just not practical. We could also get rid of all the formatting and show the email as simple text but in some cases users need to extract numbers from large emails and without proper formatting this can take some time. I was thinking about inserting <br> tags in the HTML body but since the MS Outlook templates can include multiple levels of tags for their particular formatting, it could be a very challenging task.
Hi Frenando,Was wondering what solutions you landed on to display the email? Im working on project with similar challenges.Also wondering in your use case, if you had need to correlate multiple emails together in a threaded fashion and if so could you provide any advice on how you accomplished that,
Any solution so far to display email body by converting the html tags?
Out of security concerns I would not try to display any HTML from an email in a browser without adequate safety measures. And implementing this in Appian is very challenging.
Why not go with plain text. Use regex patterns to identify spots of interest and highlight them.
© 2023 Appian. All rights reserved.