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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Extracting Info from X...
Power Automate
Answered

Extracting Info from XML and Nested XML files

(1) ShareShare
ReportReport
Posted on by 48

Hey all, Sorry for such a long post.

 

I work in manufacturing, and I am coming from WinAutomation, so I am not too familiar with the ins and outs of Power Automate. I am hoping this community can help me and give me guidance on simplifying or reworking steps in my flow to make it easily understandable and more efficient.

 

As you can see in the first picture >> a PDF triggers the flow >> get the contents of the PDF >> Call a child flow. The child flow extracts the contents of an XML file that is in a different directory but associated with the PDF that triggered the flow. It returns JSON that provides details about the production page and each image that is on the page.

Picture_1Picture_1

 

As highlighted in the orange rectangle in the first image, there is an image on the page where the name starts with “Nested Wood”. See, I have learned to nest images inside of other images to make better use of our material and the software I am using also creates an XML file for those nested images.

 

Below, I filter all the normal images on the page from the “Stamp Info” array and store them in the Image List Variable.

Then, I filter the same array but only if it contains the string “Nested Wood”.Picture_2Picture_2

 

Just like at the beginning of the flow, I have to send each of the “Nested Wood” images through the same Child flow to extract the XML content.  

Picture_3Picture_3

Then I loop through each image within each “Nested Wood” and add that Image to the Image List Variable.

Picture_4Picture_4

 

After those steps I have all the info I need, and I will add that info to a share point list next.

 

Before I do that though I am here to see if I can cut down on actions or if there are any other functions within expressions that I may use to tidy up the process.

I am sorry for such a long post, but I wanted to be detailed enough so that it could be understood.

Thanks in advance for the help and having me in the community.

Categories:
  • Verified answer
    MJain Profile Picture
    2,450 on at

    Hi @Laser_Tim_88 ,

     

    You are on track, just in last loop use the compose action to put the data instead of adding to list. When you are doing the compose inside loop it is internally adding to an array. This array can be accessed outside foreach loop. 

    All you have to do is add one more compose outside foreach loop and use expression Outputs('Compose{}'). Please note 'Compose{}' is a variable you defined in Foreach loop.  Plus if you want to speed up last loop you can right click on the loop and select settings and choose concurrency of your desired choice.

    Thanks

  • Laser_Tim_88 Profile Picture
    48 on at

    @ManishJain 

    Thank you for the reply and suggestion about the compose action instead of the Append to List. I wasn't aware that being in a loop that the compose would automatically append to the array! I will also be taking advantage of the concurrency settings.  

    Thanks again!

  • MJain Profile Picture
    2,450 on at

    Hi @Laser_Tim_88 ,

     

    Please go ahead and close the ticket by marking as a solution.

     

    Thanks

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 130

Last 30 days Overall leaderboard