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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / SharePoint Archive Flow
Power Automate
Unanswered

SharePoint Archive Flow

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

I am trying to set an automation flow to essentially archive SharePoint data from a document library with a date modified date older than 2 years (730 days) to an additional document library in the same SharePoint site whilst mirroring the folder structure. I've attached a screenshot of the flow I am currently using.

 

An issue is occurring where it isn't taking the condition of 730 days into account and is only replicating certain folders from the 'production' document library.

Screenshot 2023-12-08 160000.png

If anyone can help that would be greatly appreciated.

 

Categories:
I have the same question (0)
  • Henderson87 Profile Picture
    83 on at

    @WillWaplington 

     

    Your issue is likely with how Power automate handles dates. One thing that will help you is to use a compose action prior to your condition. 

    1. Add a compose action in you loop prior to the condition. In the compose put the dynamic content for the date modified.
    2. Add a second compose action right after that prior to the condition for you formula on the other side of the condition.

    Try to run the flow and see if the output of those compose actions are in the format that you need them to be to compare them. If they aren't there are a lot of date functions that you can use to format them in a way they can be compared. 

     

    1. They also have a function called datedifference() I recommend using that and then in the condition use is less than 730. Some times the date difference outputs in a way you need to format to a number which you can do through the replace() and or the formatdate() 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 224 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 181 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 97 Super User 2026 Season 1

Last 30 days Overall leaderboard