Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Create SP items from XML. Apply to each: creates duplicated SP entries

(0) ShareShare
ReportReport
Posted on by

Hello,

I am trying to parse and XML and create SP entries for each node information. 

I think am doing the correct thing, however in the last step (Sharepoint item creation) it seems that that action is creating extra entries in the sharepoint. For example: I've 2 products in my XML; A and B. I want to  create one entry for each product on SharePoint. However the results are:

 

-1 entry for A

-2 for B (one A and B)

 

It seems that its always creating again the previous item. 

First item result:

jcwtecpe_0-1706564453249.png

Second item:

jcwtecpe_1-1706564489741.png

 

Any idea??

 

thanks!

 

 

  • jcwtecpe Profile Picture
    on at
    Re: Create SP items from XML. Apply to each: creates duplicated SP entries

    I'm a very begginer in power automete so there are things I am not aware of 😅.

    That worked! thank you!

  • Verified answer
    Chriddle Profile Picture
    7,793 Super User 2025 Season 1 on at
    Re: Create SP items from XML. Apply to each: creates duplicated SP entries

    And you know that the function json() can convert XML to JSON?

    The method described in the post looks a little overcomplicated 😁

     

    In his post he does not nest the loops, you do.

    That's why you get more entries as expected.

    But anyhow, don't do it this way.

    Convert the XML using the json() function and save yourself array variable and xpath expessions

  • Chriddle Profile Picture
    7,793 Super User 2025 Season 1 on at
    Re: Create SP items from XML. Apply to each: creates duplicated SP entries

    Can you paste the XML as text?

  • jcwtecpe Profile Picture
    on at
    Re: Create SP items from XML. Apply to each: creates duplicated SP entries

    Sure;

    Here is the XML im using:

    jcwtecpe_0-1706566282581.png

    So for each Matnr under zcds_md15type I'd like to have a new entry on SP. So for this i am creating an array varible that have some of the information I want to paste in the SP item

    jcwtecpe_1-1706566421514.png

    jcwtecpe_2-1706566465634.png

    jcwtecpe_3-1706566527623.png

     

    I've followed this post:


    https://www.spguides.com/convert-xml-to-sharepoint-list-using-power-automate/ 

     

    But I don't a relationship in the error I have.

     

     

  • Chriddle Profile Picture
    7,793 Super User 2025 Season 1 on at
    Re: Create SP items from XML. Apply to each: creates duplicated SP entries

    Maybe you should show us the XML and/or some details of your flow 😉

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492