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 / How to eliminate row f...
Power Automate
Answered

How to eliminate row from a list

(0) ShareShare
ReportReport
Posted on by 31

I have a list with some acction already done after certain date; so in order to clean the list i want to create a flow that periodically remove the old items making a back-up in excel file.

it is possible actually manually, but I will prefere an automatic acion that can assolve this duty

regards 

Categories:
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Argas,

     

    Do you want to remove items whose created date is before a certain date in your SharePoint list and make a back-up in an Excel file?

    Could you please show a bit more your SharePoint list?

     

    I have created a SharePoint list on my side and the data structure of it as below:5.JPG

    I assume that you want to remove items whose created date is 30 days old, I have made a test on my side and please take a try with the following workaround:

    • Add a Recurrence trigger, Interval set to 1 and Frequency set to Month (I assume that you want to run this flow per month).
    • Add a "Get items" action, specify Site Address and List Name.
    • Add a "Filter array" action, From set to output of the "Get items" action, within condition box, click "Edit in advanced mode", type the following formula:
    @less(formatDateTime(addDays(item()?['Created'], 30), 'MM/dd/yyyy'), utcNow('MM/dd/yyyy'))
    • Add a "Apply to each" action, input parameter set to output of the "Filter array" action. Within "Apply to each" action, add a "Insert row" action of Excel connector (My Excel file is stored in my OneDrive folder), specify File name and Table name, Last Name field set to following formula:
    item()?['Last_x0020_name']

    First Name field set to following formula:

    item()?['First_x0020_name']

    Email field set to following formula:

    item()?['Email']

    Note: The First name, Last name and Email are columns in my SharePoint list, on your side, you should type the following formula reference the column value in your SharePoint list:

    item()?['ColumnNameOfYourSPList']

    If there is a space within the column name, please replace the space with '_x0020_'.

     

    Add a "Delete item" action, specify Site Address and List Name, Id field set to following formula:

    item()?['ID']

    Image reference:6.JPG

     

    7.JPG

    The flow works successfully as below:8.JPG

     

    9.JPG

     

    10.JPG

     

     

    Please also check and see if the following thread would help in your scenario:

    https://powerusers.microsoft.com/t5/Using-Flows/Automatically-delete-files-in-Document-Library-after-X-days/m-p/70009/highlight/true#M2056

     

    More details about using expression in flow actions, please check the following article:

    Use expression in flow actions

     

     

    Best regards,

    Kris

     

     

     

  • Verified answer
    Argas Profile Picture
    31 on at
    First of all thanks for the help.
    In order to explain better my list o will try to explain better the project.
    I have a flow already working for the management of the vacation in an office with approval and record on a common calendar.
    We are using the list from one year and now the rows are becoming a lot.
    So I want to reduce the number of the rows and manage the new insertions removing the old ones.
    It is important to make a backup of the removing rows
    So in my opinion is to create a flow that every six month can make a backup of the list and clean the rows for the item already passed leaving only two month of history.
    I will try to go through the example showed above
    Thanks
    Regards
    Arturo
  • Argas Profile Picture
    31 on at

    Thanks for the assistance.

    today i have tested the flow and everithing works fine

    ciao

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 289

#2
11manish Profile Picture

11manish 288 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard