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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Delete Items From Shar...
Power Automate
Unanswered

Delete Items From SharePoint List Using Date From Excel File

(0) ShareShare
ReportReport
Posted on by

Hi Everyone,

I have an excel file that has been exported from SharePoint. After a cleanup some of the items in the excel file have been marked for deletion in SharePoint.

 

I have managed to to start a flow and retrieve all the values that need to be deleted from the excel file. How do I go about deleting items from SharePoint matching those from the excel file?

Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    What you'll need to do is use an Apply to Each loop to loop through all of the items that you want to delete.  In the loop use a SharePoint Delete Item action.  The Delete Item action will need to use the ID of the SharePoint item that you want to delete.

     

    If you need additional help, please post a screen shot of your Flow.

     

    Scott

  • v-yuazh-msft Profile Picture
    on at

    Hi @ aadilganie,

     

    Could you please share a screenshot of the configuration of your flow?

    Have you managed to retrieve all the values that need to be deleted from the excel file?

     

    You could refer to steps below:

    1.Add an "apply to each" to get each need to be deleted row in the excel file.

    2.Add a "Get items" inside the "apply to each" to get all items in the list.

    3.Add an "apply to each 2" under the "Get items" to get each item in the list.

    4.Add an Condition inside the "apply to each 2" to check if the item's "Title" column is equal to the excel row's "Title" column.You could all check any other column.

    5.Add a "delete item" action to delete the item which's "Title" column is equal to the excel row's "Title" column.

     

    The screenshot of the flow as below:

    Capture.PNG

     

    The flow would run successfully to delete the items which's "Title" column is equal to the excel row's "Title" column as below:

    Capture.PNG

     

     

     

    Regards,
    Alice Zhang

  • Community Power Platform Member Profile Picture
    on at

    Hi Alice,

    Thanks for your reply. I am going to try the way you've outlined below and will reply back soon. I have done something similar but did not put the apply to each within the other, so this might work..

     

    Thanks!

  • Community Power Platform Member Profile Picture
    on at

    Hi @v-yuazh-msft

    I have tried your method, it seems like the right way but its seems to be taking very long, i let it run for 6 hours and it didnt stop. I have 992 to delete of a total of 1013 items that are in the list, may be theres too many items?

    This is a screenshot of my workflow currently:

    Screen Shot 2018-04-20 at 17.27.17.png

  • Community Power Platform Member Profile Picture
    on at

    Hi Alice

    I try to build this, but in "Apply to each 2" I can't do a condition with the "Title" from Excel. Why would this not be available?

     

    And if I understand correctly, the this step would be executed for Each "Apply to each", meaning the "Get items" from shrarpoint would be done for each line in Excel? If yes, is there a better way, to load Sharepoint only once?

     

    aso to mention your post is about 3.5 years old. so I have some different choices. e.g. instead of "Get row" I used "List rows present in a table" but I guess, this is doing the same thing.

     

    Thank you for any hints...

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard