cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sobenson
Helper II
Helper II

Auto Deleting Files from SP Doc Library

I am trying to delete all files from a SP library at the end of the day, basically not wanting files older than 24 hours.  I have set up this flow, but I am getting the error, "An action failed. No dependent actions succeeded." "Not Found".  Help me figure this out?

Screenshot 2021-07-23 113752.pngScreenshot 2021-07-23 113725.png

1 ACCEPTED SOLUTION

Accepted Solutions
eric-cheng
Solution Sage
Solution Sage

Hi @sobenson ,

 

For your delete step, can you try with  identifier

 

Screenshot_20210724-021308_Chrome.jpg

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

View solution in original post

5 REPLIES 5
sobenson
Helper II
Helper II

Here is the error

 

Screenshot 2021-07-23 120947.png

eric-cheng
Solution Sage
Solution Sage

Hi @sobenson ,

 

For your delete step, can you try with  identifier

 

Screenshot_20210724-021308_Chrome.jpg

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

View solution in original post

@eric-cheng Thank you!  Such a small thing, but that was exactly it!

ScottShearer
Super User
Super User

@sobenson 

While the way you have your Flow structured and the solution that you have accepted will work, it would be a much better solution if you were to use a filter query in your Get files (properties only) action and retrieve only files that meet your criteria.  Then, you can eliminate your condition and just delete all files that have been returned.

 

That said, you don't need a Flow for this - SharePoint will do this for you:

  • Go to library settings
  • Click on Information Management policy
  • Click on Document
  • Enable Retention and add a policy that deletes files 1 day after creation

image.png

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
sobenson
Helper II
Helper II

@ScottShearer Thank you, the Retention Policy looks like an easier way of doing this.  For anyone else who reads this, I was missing the Information Management policy, and needed to turn it on in Site Settings

 

Information Management Policy Settings is missing from Content Type settings or List Settings. To enable this, follow below steps:

  • Go to Site Settings –> Site Collection Features
  • Activate Library and Folder Based Retention Feature

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Users online (3,247)