cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Auto archive files that have not been accessed in sharepoint for 6 months

I have tried doing an auto archive flow for my SharePoint online sites for a couple weeks now. It started with the tutorial at the following URL: https://powerusers.microsoft.com/t5/Webinars-and-Video-Gallery/Microsoft-Flow-Tutorial-Auto-Archive-...

 

This tutorial is too fast and leaves a lot of questions unanswered, but still i was able to follow it. Ultimately there's a bunch of errors, I had another post where I tried to get help on the errors and the suggestions drifted further and further from something that worked. 

So I thought I'd start over. 

 

Does anyone know how to make a flow that auto-archives stuff by copying files that have not been accessed for 6 months from one folder to another. Namely, from any active synced library to the archive library I've created. 

 

I have seen other posts where people have followed this video and gotten errors. 

 

Any ideas on how to approach this from scratch? 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

 

Hi @frazzmata ,

 

It should be "le" instead of "ie".

 

When configuring Folder in the Copy file action, click File browse to select the folder instead of entering the folder path manually.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Community Support
Community Support

 

Hi @frazzmata ,

 

Have you tried this configuration? You can remove the Get file metadata action, it will not affect the final result of Flow execution.

182.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted

V-bacao-msft,

I ran a test just using 30 days as the date, because the test directory was last modified about 45 days ago.

I got this error from the expression you suggested: 

 

The expression " Modified ie '2019-11-17" is not valid.
clientRequestId: de706d7a-413f-4fbd-971d-c75eb17c0050
serviceRequestId: de706d7a-413f-4fbd-971d-c75eb17c00

 

seems to be a viable option otherwise, and simpler than what I was attempting. 

 

Highlighted

Disregard that last one, I changed the expression and removed the 'yyyy-MM-dd' part and it worked. 

 

But now it says the it cant verify the existence of the directory im trying to copy to: 

 

{
"status": 400,
"message": "Failed to verify the existence of destination location at 'https://tenant.sharepoint.com/sites/ITsub1/archive/' due to error 'The system cannot find the file specified. (Exception from HRESULT: 0x80070002)'.\r\nclientRequestId: a3153d92-57d3-4362-9de3-3d49227d184f\r\nserviceRequestId: a3153d92-57d3-4362-9de3-3d49227d184f"
}
 
Which is where I was before. Its like it doesn't see a directory that im looking at in sharepoint. 
Highlighted

 

Hi @frazzmata ,

 

It should be "le" instead of "ie".

 

When configuring Folder in the Copy file action, click File browse to select the folder instead of entering the folder path manually.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted

It works! Thank you. 

Wheres the best place in the flow to make a delete file option? 

 

So after it autoarchives, it deletes the file from the original location.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (9,797)