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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Deleting items from Sh...
Power Automate
Suggested Answer

Deleting items from SharePoint list with 8,000,000 rows

(0) ShareShare
ReportReport
Posted on by 96
Dear Community Members,
 
We have been using SharePoint lists to store valuations of past financial deals performed by the company. At one stage the rows inside the SharePoint list become over 8 million and I will need to find a way to delete all rows create before 1 Jan 2025.
 
Can I perform this task with Power Automate flows or should I use PowerShell in order to delete the rows since the list is huge and I am afraid that the flow will not help in this case.
 
Any advice would be highly appreciated.
SharePoint List Items.png
Categories:
I have the same question (0)
  • Suggested answer
    Lagortinez Profile Picture
    130 Moderator on at

    Hi,

    This is a very common concern when working with large SharePoint lists.

    If you're not in a hurry, Power Automate can definitely do the job — just not all at once.

    ✅ Recommended Solution: Batch Deletion via SharePoint API

    If you're familiar with technical documentation and comfortable working with HTTP actions, you can use batch operations via the SharePoint API to delete items efficiently.

    There's a great example and explanation here:

    This method significantly improves performance and reduces the number of API calls needed, making it ideal for large datasets.

    🕒 Optional Maintenance: Scheduled Cleanup Flow

    To prevent this from happening again in the future, consider setting up a Power Automate Scheduled Flow that:

    1. Runs during off-hours (e.g., overnight).

    2. Filters for items older than a certain date (e.g., 90 days).

    3. Deletes up to 100,000 records per run (using batching or iteration).

    This scheduled cleanup is:

    • Easy to maintain

    • API-efficient

    • Ideal for ongoing data hygiene

    ⚠️ Notes:

    • Make sure to monitor API usage limits (both SharePoint and Power Automate).

    • Consider adding a delay between deletions or batches to avoid throttling.

    • Index your Created column for better filtering performance.

    🧰 Alternative: PowerShell

    If you need it done faster or all at once, PowerShell with SharePoint PnP or CSOM is a better fit. It can delete items in bulk, but you’ll need:

    • Admin rights

    • Proper authentication setup (especially for SharePoint Online)


    ✅ Bottom line: Use SharePoint API batching for efficient mass deletion. Then schedule a recurring Power Automate flow to keep your list clean over time.

    If this post helped you, please click "Does this answer your question?" and give it a like to help others in the community find the answer too!

    José Martínez Lago
    Solution Architect | Dynamics 365 & Power Platform
    Empowering low-code consultants to deliver high-impact solutions
    Blog: www.thatsagoodquestion.info
    LinkedIn: martinezlago

    If you have any follow-up or questions, feel free to mention me in your reply so I get properly notified!

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 1,027

#2
Valantis Profile Picture

Valantis 809

#3
Haque Profile Picture

Haque 645

Last 30 days Overall leaderboard