Hello everybody!
I have searched and couldn't find a solution for this. Anybody who could figure this out, please!
I have generated a simple Flow with expression xml(triggerbody()['text']) as following:
I run it and paste xml data (generated from an applicaiton) in input window. The flow fails because:
- xml has links (https://) that has '&' in it.
- xml has data entered by users that has text like '<xxx>'. Flow identifies it as a tag, searches for end tag and fails.
Is there any way that Flow could delete certain data from this xml and input the treated data to the Flow for further operation?
For example, I would want to delete data between certain tags. Can I do this if the data is in xml form or saved in .text file or any other way? May be 2 different Flows for this?
Thank you!!
Best regards,
Zainab
If the & only needs to be replaced in the &avatarId or &avatarType sections then you could try:
@Amanthaper Thank you for replying!
I have used replace expression as following and the error message still stays. 😕
Also tried replacing & with = in the expression. Runs into error again.
If I use replace expression, it will end up replacing characters/letters in the whole document - messing up the data.
Plus, the file I have has a lot of useless data too. That's why I am trying to find out a way with which I could delete/ignore data between certain tags.
And if not in xml then, may be any other format that allows it.
Greetings,
Zainab
Hi,
You could use the replace function to resolve both issues.
To remove the "&" for the first issue use this expression: replace(xmltriggerBody()['text']),'&',''). Be sure to reference your flow element in the expression.
Once you isolate the second issue and, given that it's a consistent repetitive pattern, use the Replace function to either change the problematic syntax or remove it altogeher.
Hope this helps. If you still need more help please post (or send privately) a whole or partial xml file and I'll try to replicate the issue.
Cheers,
Aman T
------------------------------------------------------------------------------------------------------
If my post helps you with your problem or answers your question, please mark it Solved or Answered. This helps anyone with similar challenges. If you like my response, please give it a Thumbs Up.
------------------------------------------------------------------------------------------------------
@Jcook Thank you for replying.
It's the Compose action that fails.
Here is a piece of a very long (5MB) XML data that is generated from JIRA (a project management application).
<channel>
<key id="7395096">xxxx-2618</key>
<summary>New Discover of Database xx Type "Standalone" vs. "BS"</summary>
<type id="5" iconUrl="https://xjira.x.x.corp/secure/viewavatar?size=xsmall&avatarId=27826&avatarType=issuetype">Task</type>
<parent id="7371576">xxx-2599</parent>
<status id="1" iconUrl="https://xjira.x.x.corp/images/icons/statuses/open.png" description="The item is open and ready for the assignee to start work on it.">Open</status>
</channel>
It gives following error message:
I removed '&' from the underlined part of the URL in code and then it runs successfuly.
Similarly, there is another chunk of code from the same file that also runs into error.
<title>[xxxx-000] Change ACExxx "ADJUST TIMEZONE" to include "db2<sid>", "x<sid>" and "<sid>db" users for Servers</title>
Error message:
When I run the whole file, I also come across this following error message:
Due to these error messages, I want to automate flow in a way that it could ignore code inside certain tags in any way possible.
Best regards,
Zainab
Hello @Anonymous
Could you provide a sample XML message.
Also which step is failing? The trigger itself? Or is it the Compose action that fails?
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2