In this Microsoft flow or Power Automate tutorial, we will see how to bulk delete list items in SharePoint Online using Power Automate. Here is a detailed example on Power Automate delete all items in sharepoint list.
Power automate delete SharePoint list items
There will be a number of scenarios where you will want to delete all items from a SharePoint list. There are various ways we can delete all items from a list in SharePoint Online or SharePoint 2013, SharePoint 2016, or SharePoint 2019. Check out SharePoint 2016 vs SharePoint 2019.
Let us first check the steps to delete SharePoint list items using flow or Power Automate.
For this, I have created a SharePoint list and you can see there are a few items in the list. We will delete all items using flow.
Now, let us create the flow or Power Automate.
Go to https://india.flow.microsoft.com/ and then click on the + Create button from the left navigation.
Then it will show the three ways to make a flow in Office 365:
- Start from blank
- Start from a template
- Start from a connector
Here select Instant cloud flow from Start from blank. You can select a Scheduled cloud flow or any other option.
You create an Instant cloud flow, then you can trigger manually from Power Automate mobile app. If you make a scheduled cloud flow, then you can trigger the flow on a scheduled basis.
But for this example, I will create an Instant cloud flow.
Then it will ask for a name and you have to select when to trigger this flow, here I have selected to Manually trigger a flow. In this case, you can see a flow button on Mobile. And I gave the name as “Delete All Items Flow”. Then click on the Create button.
Then the flow will get created and here click on + New step to add out flow logic to delete all items from the SharePoint list.
Here search for get items and then add the Get Items SharePoint flow action like below:
Now, configure the Get items flow action. Choose the SharePoint Online site name where your list is presented. Then it will display all the lists presented under the SharePoint Online site. Here then choose the particular list from which you want to delete all the items.
Once you have all the list items, we need to iterate over it by using the Apply to each control. Search for Apply to each and add it to the flow.
Then it will ask for “Select an output from previous steps“, here choose value. Once you put the cursor, it will display.
Then inside Apply to each, click on Add an action. Then it will add an action inside it.
Here, we need to delete items from the SharePoint Online list. Search for Delete item and add Delete item SharePoint action. This will take the item id and will delete the item.
Here we need to configure the Delete item action. Here provide the Site Address (Select the SharePoint site URL), List Name (Select the list name) and then in Id provide the ID of the List item like below:
Now Save the flow and now, we can test the flow. Hereafter saving the flow, click on the Test button like below:
Then it will ask you to test whether Manually and Automatically. Here choose Manually.
Then you can click on Run flow button like below:
Once the flow run successfully, you can see a message like below:
And if you see the Flow history, a green tick mark will appear in all the steps. If there will be any issues, then it will show the error here.
Now, when you will open the SharePoint Online list, you will see all the SharePoint list items.
Anytime you can click on the My flows and you will be able to see all the flows. From here also, you can select the flow and click on the Run button like below:
If you are using flow mobile app, then you will see a button and on click on the button, the flow will trigger.
This is how to delete all items from SharePoint list using Power Automate.
I have also created a video tutorial on how to delete all items from sharepoint list using power automate.
You may like the following SharePoint tutorials:
- How to add Comments to SharePoint Online List Items and Microsoft 365 Lists Items
- How to add site column to SharePoint list programmatically using csom
- PowerApps upload file to SharePoint document library
- Save my email attachments to a SharePoint document library Power Automate or Flow
- SharePoint auto generate column value using Power Automate or Flow
- Microsoft flow Send an email showing wrong time for SharePoint list column
- Microsoft flow change true to yes
- Remove all items from a SharePoint Online list using PnP PowerShell
- Leave Request Approval Flow using Power Automate or Microsoft Flow
- Power Automate create an HTML table
In this SharePoint tutorial, we learned, how to delete SharePoint list items using Power Automate. Different ways to delete SharePoint list items:
- Delete all items from SharePoint list Power Automate
- power automate bulk delete sharepoint list items
- How to delete all items from sharepoint list power automate
I am Bijay a Microsoft MVP (8 times – My MVP Profile) in SharePoint and have more than 15 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com