web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / [FLOW][Teams] XML mess...
Power Automate
Unanswered

[FLOW][Teams] XML messages get truncated in Teams group chat

(0) ShareShare
ReportReport
Posted on by

Good Afternoon,

 

I am trying to upload, as a message on a teams group chat, a XML output. Hopefully you can help me and others with this tasks.

 

XML output anonymized:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE LIST_OUTPUT SYSTEM "https://website.com/list_output.dtd"> 
<LIST_OUTPUT>
<RESPONSE>
<DATETIME>2023-02-28T14:46:13Z</DATETIME>
<LIST>
<TASK>
<REF>***/**********</REF>
<TYPE>On-Demand</TYPE>
<TITLE><![CDATA[test]]></TITLE>
<USER_LOGIN>*******</USER_LOGIN>
<LAUNCH_DATETIME>2023-02-28T11:17:30Z</LAUNCH_DATETIME>
<DURATION>00:03:10</DURATION>
<PROCESSING_PRIORITY>0 - No Priority</PROCESSING_PRIORITY>
<PROCESSED>1</PROCESSED>
<STATUS>
<STATE>Canceled</STATE>
</STATUS>
<TARGET><![CDATA[123456]]></TARGET>
</TASK>
<TASK>
<REF>***/**********</REF>
<TYPE>On-Demand</TYPE>
<TITLE><![CDATA[test2]]></TITLE>
<USER_LOGIN>*****</USER_LOGIN>
<LAUNCH_DATETIME>2023-02-28T09:10:56Z</LAUNCH_DATETIME>
<DURATION>00:06:05</DURATION>
<PROCESSING_PRIORITY>0 - No Priority</PROCESSING_PRIORITY>
<PROCESSED>1</PROCESSED>
<STATUS>
<STATE>Canceled</STATE>
</STATUS>
<TARGET><![CDATA[12345]></TARGET>
</TASK>
</LIST>
</RESPONSE>
</LIST_OUTPUT>
<!-- A COMMENT //-->

Here is the output of this XML on a Teams group chat

 

2023-02-28T13:14:52Z ***/****** On-Demand **** 2023-02-28T11:11:55Z Pending 0 - No Priority 0 Running

And here is the process on the Flow

plnvb_0-1677597638418.png

I cannot get that output as a JSON format directly from the HTTP request.

 

Here are the different steps I tried, these steps gave no output (blank message or not even a message on Teams group chat):

  • string(body('HTTP 4'))
  • xml(body('HTTP 4'))
  • body('HTTP 4')
  • xml(json(body('HTTP 4'))) - failure to be executed
  • xpath('body(HTTP 4'), '/') - I also tried with, //, /LIST_OUTPUT, (/), (//) and (/LIST_OUTPUT) instead of just '/'
  • xpath('xml(body('HTTP 4')), '/') - I also tried with, //, /LIST_OUTPUT, (/), (//) and (/LIST_OUTPUT) instead of just '/'
  • json(body('HTTP 4')) - failure to be executed
  • In the "Post message in Chat or Channel"'s code view, set the body between: xml body('HTML 4') xml - fails to be approved
  • HTML to table
  • Data operation tasks
    • Compose: get the XML as text, then convert it as a XML again, or as JSON, or use XPATH
    • Parse JSON - fails to be executed
    • Create HTML table

      I am able to paste that XML into the chat manually without any issues. There are not mentions of such issue in XML related docs for teams or Power Automate. I think I have tried everything accessible to me at this point. Teams' messages are able to display XML, both as text or code format.

       

      My goal is to isolate the title and the target.

      plnvb_1-1677598749991.png

      I also tried using the format data by examples functionality, but it was unable to provide me an output Regex.

       

      Thank you for your time.

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard