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

Community site session details

Session Id : vnLW1/AuwqTigh8SvxqIPK
Power Automate - General Discussion
Answered

Delete Items Older than X Days from Sharepoint List Created From Microsoft Forms?

Like (0) ShareShare
ReportReport
Posted on 9 Nov 2020 15:35:01 by 13

I am trying to create a Power Automate flow to remove data older than 21 days from a Sharepoint List created from Microsoft Forms.

 

I have created a COVID-19 contact tracing List using Power Automate and to comply with  Data Protection I would like to delete data over 21 days.

 

I have a column named Date but don't know how to creat a simple work flow.

 

Can anyone help as this solution would help many users who have to collect details of visitors?

 

Many thanks.

I have the same question (0)
  • Jste84 Profile Picture
    4 on 10 Apr 2024 at 14:33:16
    Re: Delete Items Older than X Days from Sharepoint List Created From Microsoft Forms?

    Hi all, im looking to do something very similar but rather than delete a whole record from sharepoint. I only need to delete one field, does anyone know if this is possible?

  • renatopc84 Profile Picture
    44 on 19 Feb 2024 at 12:09:07
    Re: Delete Items Older than X Days from Sharepoint List Created From Microsoft Forms?

    Hi ncotela23

     

    I assume the problem has been already solved, but for documentation, in your "Filter Query" is missing an operator like lt, ge, gt, le. Example Created lt ...

  • ncotela23 Profile Picture
    101 on 13 Oct 2022 at 22:32:08
    Re: Delete Items Older than X Days from Sharepoint List Created From Microsoft Forms?

    Hi there - When I try this it keeps failing. Please see how I have it set up in image 1 below and the error in image 2 below. Any ideas?

     

    ncotela23_0-1665700370134.png

     

    ncotela23_1-1665700397142.png

     

     

  • Chris989 Profile Picture
    2 on 25 Jan 2022 at 13:05:37
    Re: Delete Items Older than X Days from Sharepoint List Created From Microsoft Forms?

    Hey.

     

    Hoping someone here may be able to help. I've got exactly this scenario and I've set up the flow as above - except I'm using delete file instead of delete item as it's not a SharePoint list but a document site. 

     

    If I trigger the flow as a test, it works as long as nothing is older than the date specified. The minute it actually has something to delete I get this error: 

     

    Chris989_1-1643115827369.png

     

    It's right, there isn't a file called 8, but this the ID of one of the files when you look at the output of get items. 

     

    I'm at a bit of a loss.. 

     

     

  • Verified answer
    Whisky1 Profile Picture
    13 on 11 Nov 2020 at 18:55:24
    Re: Delete Items Older than X Days from Sharepoint List Created From Microsoft Forms?

    Hi @gabibalaban ,

     

    Brilliant thanks.  You sorted it no problem.

     

    I now have it running daily to delete the information older than 21 days to comply with our GDPR.

     

    Thanks a million.

  • Verified answer
    CU-18081211-6 Profile Picture
    9,266 Moderator on 11 Nov 2020 at 13:35:15
    Re: Delete Items Older than X Days from Sharepoint List Created From Microsoft Forms?

    @Whisky1 

    You missed lt (lowerThen) in the GetItems formula ... some please try: Date lt ...rest of formula.

    Also, please take in consideration to use Created column (rather then Date column) of your sharepoint list (it's a Default column that store the datetime value when the item was created)  .

  • Whisky1 Profile Picture
    13 on 11 Nov 2020 at 12:54:57
    Re: Delete Items Older than X Days from Sharepoint List Created From Microsoft Forms?

    Hi @gabibalaban .

     

    Thanks for your help which is getting me ever closer to my solution.

     

    I'm getting a failure on:

    Whisky1_0-1605098435146.png

    Whisky1_1-1605098672462.png

    I have checked the Date colums in my List which gets its information from a Microsoft Form from the Submission time.

     

    Whisky1_3-1605099146692.png

     

    Whisky1_2-1605098988752.png

     

    Can you or anyone else see what the issue is?  I read somewhere that dates and times should be converted to UTC which might be the issue.

     

    Once again @gabibalaban  many thanks.

     

     

     

  • CU-18081211-6 Profile Picture
    9,266 Moderator on 09 Nov 2020 at 19:00:57
    Re: Delete Items Older than X Days from Sharepoint List Created From Microsoft Forms?

    Hi @Whisky1 ,

    Here is my proosal ...

    Capture.PNG

    Hope it helps !

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete