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

Community site session details

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

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:
I have the same question (0)
  • Verified answer
    MJain Profile Picture
    2,450 on at
    Re: Extracting Info from XML and Nested XML files

    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
    Re: Extracting Info from XML and Nested XML files

    @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
    Re: Extracting Info from XML and Nested XML files

    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

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard