Showing results for 
Search instead for 
Did you mean: 
New Member

Auto Delete One Drive Files

Hello.  I'd like some help in figuring out how to build a flow that checks the age of files in a OneDrive folder and deletes whatever is older that a time I can define.  Anyone?  Seems like that should be simple enough, but I'm just not that savvy.

Resident Rockstar
Resident Rockstar

Re: Auto Delete One Drive Files

Hi @TechNichols 

I was looking at this a little the other day and here is what I found:

    "Name": "Document.docx",
    "NameNoExt": "Document",
    "DisplayName": "Document.docx",
    "Path": "/Temp-DoNotRemove/Document.docx",
    "LastModified": "2019-02-11T10:37:52Z",
    "Size": 10987,
    "MediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
    "IsFolder": false,
    "ETag": "\"{67F50226-448F-4A1E-BF2D-6F70547FB2BE},3\"",
    "FileLocator": "01XVAUD2JGAL2WPD2EDZFL6LLPOBKH7MV6",
    "LastModifiedBy": "AlanPs1"

Regards the above code, this is the JSON from the metadata. This is true for both OneDrive and OneDrive for Business.

You will see a property for LastModified": "2019-02-11T10:37:52Z

There is no CreatedDate so you could use either of the following to access LastModified and to do a comparison on it's date. This tends to do the trick I find!


If you have found my post helpful, please mark thumbs up.

If this post has solved your problem, please click "Accept as Solution".

Any other questions, just ask.

Thanks, Alan

Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!

Helpful resources

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!


Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (9,647)