Forum Discussion
Ollie
May 30, 2025Copper Contributor
Deleting old rows from a SharePoint list
Hi,
I am using a SharePoint site as a database for a desk booking system.
The data is held in SharePoint lists.
I want to delete old data, i.e. items older that 1 month
Is there an easy way to do this?, the list contains thousands of records from the past 4 years.
Thank you for your time,
Ollie
1 Reply
Sort By
- Rob_ElliottBronze Contributor
The simplest way would be to use a flow in Power Automate with the filter query in the get items set to the expression of Created lt addDays(utcNow(),-31). The add an apply to each with a delete item action inside it. As the default number of items returned in the get items action is 100 you will need to go to the Settings of the Get items action, turn on pagination and set the threshold to more than the number of items in your list. Do note that the flow will take quite a while to run.
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, Microsoft Power Platform, WSP Global (and classic 1967 Morris Traveller driver)