1
votes

Is it possible to show formatted HTML Content inside a Bot Card/Attachment? In this Case, we retrieve the content field of a Dynamics 365 CRM Knowledge Article which is in HTML Format and want to show it to the bot user.

1
Please show us what you have tried ? - dipak_pusti
On which channel do you want to show your html and which SDK are you using, .NET or node.js? - Grace Feng
Have you checked my answer? Any update? - Grace Feng

1 Answers

0
votes

Most of the channels in the Bot Framework don't support HTML rendering. You may refer to this issue: Can a .html file be rendered in cards and HTML should be sanitized in messages.

enter image description here

One alternative way is that to extract information from your html and create cards to show them, to create cards in Bot Framework, please refer to the official Rich Cards Bot Sample for .NET SDK / Rich Cards Bot Sample for node.js SDK.

Another approach is that we use markdown to make a hyperlink to your html.

For example, in C#, you can simply code like this:

var text = @"[Google Search](http://www.google.com)";
await context.PostAsync(text);

But markdown is not supported by all channels too, you may refer to this Bot Framework markdown support by channel for more information.