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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Auto archive files tha...
Power Automate
Unanswered

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

(0) ShareShare
ReportReport
Posted on by

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-SharePoint-Files-6-Months/td-p/153930

 

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? 

Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    on at

     

    Hi @Anonymous ,

     

    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 Power Platform Member Profile Picture
    on at

    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. 

     

  • Community Power Platform Member Profile Picture
    on at

    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. 
  • Verified answer
    v-bacao-msft Profile Picture
    on at

     

    Hi @Anonymous ,

     

    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 Power Platform Member Profile Picture
    on at

    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.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard