'How do i display XML/HTML tags in teams message using incoming wehbook api?
Problem statement: Whenever I pass XML/HTML tags in the request JSON, teams interpret it as a code and hide the XML/HTML tags given. And only displays the data within the tags as a message like 12388pdfserver
{
"text": "<?xml version=\"1.0\"encoding=\"UTF-8\"?><Event><id>123</id><pid>88</pid><assettype>pdf</assettype><applicationname>server</applicationname></Event>"
}
I would like to print below two messages as-is in the team channel message via incoming webhook. Message format #1:
Processing failed for the below event:
{
"objectId": 1983925,
"jornal": "RPRJ",
"objectType": "MAN",
"approved": "Y",
"event": "<?xml version=\"1.0\"encoding=\"UTF-8\"?><Event><id>123</id><pid>88</pid><assettype>ProofPDF</assettype><applicationname>HUB</applicationname></Event>"
}
Failure Reason: Could not find object id.
Message format #2:
Processing failed for below event:
<?xml version="1.0" encoding="UTF-8"?>
<Event>
<id>123</id>
<pid>88</pid>
<assettype>pdf</assettype>
<applicationname>server</applicationname>
</Event>
Failure Reason: Could not find ID and PID.
Solution 1:[1]
All text fields in actionable messaging cards support basic Markdown.
Do not use HTML markup in your cards.
HTML is ignored and treated as plain text.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nivedipa-MSFT |
