Auto Archive SharePoint Online Files - Power Automate
Вставка
- Опубліковано 5 вер 2024
- This video demonstrate how you can easily archive SharePoint Online files using Power Automate Flow. You can implement archiving policy for your SharePoint based document management system.This demo Flow will be arching any document which is not modified in last 6 moths. This can be changed according to your company policies.
Website: www.keapoint.com/
Follow us on Twitter: / kea_point
Like our Facebook page: / keapointuk
Follow our page on Linkedin: / 18782324
This is great!
The icing on the cake would be to automatically put the "archived" items into folders with names formatted to reflect "year>month>day"!
Hi @keaPoint Tech Tips, I had couple of questions:
1. Can we archive the files with leaving "STUBS" behind the original directory ?
2. Can the destination folder be on GCP?
You can use flow to archive documents to Google and add link to the destination file in the original document library.
@@KeaPointTechTips Is there any video or documentation that I can refer to add link of the destination folder in the original folder?
You can add link to a file of an actual file in SharePoint library. I have not seen a video around this topic.
@@KeaPointTechTips Thanks for your response, really appreciate your patience.
I have couple of more queries, would really appreciate your response here.
1. In the last step of flow, that is under "Move File" where we select the destination folder, how do I point this towards the google cloud storage, as the use case of my customer is to move the archival files from SharePoint online to google cloud storage.
2. Post I move the file, how can I automate the flow to create a link of the file which was moved to destination in the current site address, the use case here is to leave the stub behind so as the end users can access quickly whenever they require.
Hey.. I tried to pass the logic of 6months ago via a parameter from adf but it is being passed as a string but the actual value of a timestamp is not being passed. How to achieve this?
I have a new form -
Multiple excel files will be uploaded daily. The auto archival should occur every day for these files and the latest ones should be retained in the root folder. How can that be achieved?
do you have a video to move created SP list items using Power Apps into folders where security groups have been applied to - based on a choice column value. For example, when a user creates an item, depending upon the choice selection (a, b, c, d), the item should move to a security group A, B, C, or D.
Hi Linda, I don't have a view on it but possible.
Great video!
is it possible to move files and keep the existing file structure?
Yes you can. You will need to use "Copy File" flow action instead of "Move File".
Like the others, I was having problems with the "modified lt" because it's a lowercase "L" not a capital "i". After this, my workflow executes succesfully everytime, but it moves nothing from my test folder with documents older than 6 months. Do you know what can be happening? Thanks for the video!
didn't you filter it to only process last 6 months data?
I have the same issue. The workflow executes succesfully everytime, but it moves nothing too. I`m using this sequence..
Manually trigger a flow
Variable - String - with expression: startOfDay(addDays(utcNow(), -3))
Get files (properties only) with Filter Query: Modified lt 'variable'
Apply to each - value
Get file metadata - identificador ** (Pt-Br) but the same "identifier"
Move file - File to Move "Path"
But nothing happens.....
Anyone can help me?
@@KeaPointTechTips I''m only testing, since I don't want 6 months of data. But in this case, I put files with more or fewer 6 months old. The process is executed sucessfully, but it moves nothing.
I did exactly the same you show on your video.
@@KeaPointTechTips in review the apply to each takes 0 seconds.
@KeaPoint Tech Tips okay so to keep same folder structure while archiving ,ill copy the "if folder " and copy folder structure from link you pasted in one of the comments and for else ill use this video to move file but that will copy the folders but move the files to one destination we provide...how can we archive so that file in folder (x) move to archive destination in folder (x) and similarly file from y move to folder y in archive destination...please help.
You need to put this logic in power automate flow to create the folder structure, navigate to that folder structure and "move file" command to move files
Thank you for the great video.
Is it possible to move the old files to an Archived folder with same folder structure?
Example:
Source: Documents\Work\This.File.docx
would get archived to:
Destination: Archived\Work\This.File.docx
Is this case it created the "Work" folder and stored it in Archive folder while retaining the folder structure.
Yes, you can create an automated flow in power automate to run on demand or daily to copy data from one location to other.
@@KeaPointTechTips Is it possible to provide any tutorial on how to move(Archive) data with folder structure being intact? Thank you!
Hi Mickey
I have made another video in the past where I explained how to copy nested folder structure from one SharePoint site to another using power automate. Here is the link.
ua-cam.com/video/inZz9537sXs/v-deo.html
@@KeaPointTechTips Sorry I'm new to Power Apps. Is it possible to grab your direct assistance on this? We've also tried sending an email to contact@keapoint.com in regards to this setup. Thanks!
I don't see "identifier" in my list of dyanmic options for the get file metadata step.
I am not sure why you are not seeing the identifier, are you using the correct SharePoint get file metadata action?
do you have a similar video for archiving lists?
You mean you are looking for a video on archiving list data?
@@KeaPointTechTips yes
so the issue here is that if you are moving a file which is in a subfolder, it won't work. Or at least, it won't copy the folder structure of that file. It's not like people never use subfolders in their doc. libraries. Can you make a tutorial how to archive with folder structure?
Ah, I will see if I can make a video to copy nested folder structure. I thought this video works with copying nested folder structure as well
@@KeaPointTechTips But it should work in a single flow, in my opinion. I found the video to copy the nested structure from one doc lib to another, but structures can change. When it copies a file, it should check if that path exists in the archive doc lib and copy to it, or if it does not exists, create the structure and then move the file.
Easy for me to say, since i don't have the answer nor I know how to fabricate it. But that's what i'm looking for! :) if you know how to do this, you would be the king of power automate to me
I think this scenario is doable, but I have never tried it. Is this something urgent or can wait a week or so?
@@KeaPointTechTips It's urgent but can wait a week :P so this is a week now :D
Hello, has there been any update to this. Would love to automate and keep the file structure in tact.
Can I do the same in SharePoint List as well?
Yes, same logic can be applied to SharePoint list contents.
How would that work? What I'm wanting to do is export the contents of a sharepoint list where created or modified date is older then 3 months into to excel and then clear the those records in the list that are older than 3 months.
My flow keeps failing at "Modified It" pls help!!!
Can you share the workflow action screenshot please?
Im also getting error on that part
I am also having the same issue
The expression "Modified lt '2020-11-17T00:00:00.0000000Z" is not valid. Creating query failed.
clientRequestId: ce871428-1fe7-427e-8adf-a48d00eafd36
serviceRequestId: ce871428-1fe7-427e-8adf-a48d00eafd36
I am getting the same error
Hello, how are you? I'm getting a error after the third step (get files (properties only) when try test, I get this error "{"odata.error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"The expression \"Modified It '2021-04-21T00:00:00.0000000Z'\" is not valid."}}}"
You saw something similar like it?
Thx so much.
The date formant is not correct. What format you are using in the SharePoint site regional settings?
@@KeaPointTechTips Locale: English (United States) time format: 12 hours