Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Sharepoint Library Items newest into an existing Excel File ( also stored in Sharepoint)

(1) ShareShare
ReportReport
Posted on by 31
 
Hello all, 

THANKS A LOT IN ADVANCE 🧡

 

Step 1) The Items in Sharepoint Library are always like this - the field "ID" is unique 

JuliaDRX_0-1719917420512.png

 

Step 2) 

bring the Items into an existing Excel file ( which is stored on another folder in the Sharepoint)

JuliaDRX_1-1719917420375.png

 

WORKS GOOD SO FAR !

Problem: it is not checking if the "ID" already exist, and put it in again and again

 

JuliaDRX_2-1719917420530.png

 

The Flow is build up like this:

1) Recurrence : every day 

 works✔️

 

2) Dateien abrufen (nur Eigenschaften) from folder "Reparaturaufträge" 

 works✔️

 

3) Variable : Name* ID, Type:Array , Value: body/value "list of elements"

 works✔️

 

4) Choose variable: from* body/value, map* ID  = union(variables('ID'),variables('ID')) 

 HERE is the checking missing

 

 

5) For Each "body/value" >> add a row into excel file table wich is matched with every single field


 

 works✔️

JuliaDRX_8-1719917420677.png

 

 

 

 

  • JuliaDRX Profile Picture
    31 on at
    Re: Sharepoint Library Items newest into an existing Excel File ( also stored in Sharepoint)

    Found my mistake 🙂 thanks for you help 

  • Verified answer
    JuliaDRX Profile Picture
    31 on at
    Re: Sharepoint Library Items newest into an existing Excel File ( also stored in Sharepoint)

    JuliaDRX_0-1720106018245.png

    IT WORKS ! 

  • Verified answer
    v-yueyun-msft Profile Picture
    on at
    Re: Sharepoint Library Items newest into an existing Excel File ( also stored in Sharepoint)

    Hi , @JuliaDRX 

    I create a sample test flow , you can refer to :

    The "List rows present in a table" is used to check if the [ID] exist in your Excel file!

    vyueyunmsft_1-1719990810911.png

     

     

    items('Apply_to_each')?['ID']

    length(outputs('List_rows_present_in_a_table')?['body/value'])

     

    You need to use your action name in your side.

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

     

  • JuliaDRX Profile Picture
    31 on at
    Re: Sharepoint Library Items newest into an existing Excel File ( also stored in Sharepoint)

    JuliaDRX_1-1719990252734.png

     

  • JuliaDRX Profile Picture
    31 on at
    Re: Sharepoint Library Items newest into an existing Excel File ( also stored in Sharepoint)

    I want to add it if the ID does not exist- yes. BUT I also want no adding if the ID is already existing. 

     

    Right now I have some ID multiple time in the file - because the flow is just adding everything again and again 

    JuliaDRX_0-1719990166309.png

     

  • v-yueyun-msft Profile Picture
    on at
    Re: Sharepoint Library Items newest into an existing Excel File ( also stored in Sharepoint)

    Hi, @JuliaDRX 

    Thanks for your response! 

    As in your screenshot , the [body/value] is the whole files return from your "Get files" action. So it will always unique.

    According to your description, do you mean you want to add a row to your Excel when the [ID] column do not exist in your Excel file ?

     

    Best Regards,

    Yueyun Zhang

  • JuliaDRX Profile Picture
    31 on at
    Re: Sharepoint Library Items newest into an existing Excel File ( also stored in Sharepoint)

    Hi 

    Yueyun Zhang, first of all thanks for your help !

    I just took the "body/value" 

    JuliaDRX_1-1719987759160.png

     

    JuliaDRX_0-1719987690228.png

     

    JuliaDRX_2-1719987800486.pngJuliaDRX_3-1719989469381.png

     

     

  • Verified answer
    v-yueyun-msft Profile Picture
    on at
    Re: Sharepoint Library Items newest into an existing Excel File ( also stored in Sharepoint)

    Hi , @JuliaDRX 

    What's the field you put in your "Initialize variable" action?

    And can you show me a screenshot for the output of your "Select" action in your flow run history.

     

    Best Regards,

    Yueyun Zhang

     

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