Sometimes you have a need to clear all items from a SharePoint list. How to do it with Microsoft Flow? Let's find out!
Create a flow with any desired trigger. I use manual for simplicity. Microsoft Flow's SharePoint default connector doesn't have any method to delete all items, thus we will create a series of steps to achieve it.
The first step is to get all the items from our target list:
Now as we have our items, let's iterate over each item and delete them one by one. Add Apply to each control action:
We're going to iterate over our items from the previous step, thus add it as "iterable value":
The last step is simply deleting an item. Inside the "each" loop add a new action Delete item from SharePoint connector:
Fill in the site and list address, as Id parameter select ID as in the below image:
Here is our resulting flow, which deletes all items from a SharePoint list: