Auto Archive SharePoint Online Files - Power Automate

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello and welcome back to a key point tech tip channel in today's video I'm going to show how you can create a workflow to archive all documents residing in a shipping document library any ship on site ready so what I would use is I will have a shipment library which is most talks very so this lab we have some document which are over let's say six months old from today so today is 22nd of April 2020 so these documents are in 2019 HIPAA which means definitely all these three documents are more than six months old critical document today so which shouldn't be migrated so if I'm looking for migrating all the document which I'll not been modified in six months and to an archive library so the archive library archive document is sitting on the same side as well it could be on a different side so at the moment I can show you that this library is empty now to create a flow I will be using power automate to create the flow so in of 6-5 center I can see it I can here but if you don't see it go to all apps and then you will be able to click on power automate and under my flows I can see the floor which are I've already created so if I create a new flow so this will be a schedule because we want this to run every maybe day or vehicle month to look for any document which are not modified in last six months and just move them into archive folder so I'll just call it archive master docks so it will be archiving master dogs one this workflow of starting from today I repeat every day I would say and just create this will create a first of which is how often you want to run this flow flow you can go and edit if you want so the first step is I would initialize a variable which will keep the days how how many days you want to go back to check for if the document has been modified or not so if I just click on your step and just start variable so if I just write variable if I click on variable I will say initialized variable so the name of the variable is maybe six months old I need aqua which is six month old kind of calls variable six months old ox string the value now this is the most important bit so the values gonna be regular expression the way we create this regular expression is we start with the function start start off day and and then we say days add days and then we open bracket UTC UTC now which is today comma how many days you want to go back so if we talk about six month this will be minus 180 day so any talk knowledge is six months or more old will be moving into archive document order so we got the variable there next step is we need to get files from our master double library so if i just type get files property onlys yeah so the site address is asking for us to get to the site address so we know this side is else i library we're talking about the master talk this is the library way which you want to look for the document now we need to go into advanced option and apply the filter because we only interested in the document not been modified in last six months so in the hurry we going to provide that information so we will say modified last time and then single code and I will use our variable then single quote close so this will return all the documents which are more than six months old and not been modified since last six months now the next step is because it will return a collection of document we need to create a step which is applied to each so apply apply to each control we have to put in there now what this is is selecting setting is asking for what you want to get output from the previous step is required to apply for each so automatically you can get list of items you put that in there now another action we need to get inside the for each now is to get file master data so we can get the file part to move it to a new library so get for metadata so get formatted a shape on action we click on that now this is asking us for to provide the site address so we know that it is a shell side and file identifier if I just scroll this list down I'll be able to find to identify for the file so we got that so we now applied for each loop and then we got the metadata about the file so the information about the file the part name and all that kind of stuff and the next up we want to add is the move file so we're moving a file from one document library to another library so move file now this is asking for the current site address we know that it is shell file to move so now the file to move is from previous step because we got the file metadata we should be able to get the part of the file so we slept apart the destination site at the moment as I said it's going to be same side you can have a different side to archive document and destination folder this will be this will be actually if you click on this folder I will be able to select archive documents so I have a so I'm able to select the destination folder here now the next one is if the file already exists what it should do I would say just replace now that's pretty much is that the buffer will run every day look for this variable and get all the files which are more than six months old and not been modified and then for each file it will move it to archive document library so if I just say it this one now our cup must talk flow is saved if I just show you we already call these three files which are more than six months old I'm expecting all these three file to move to archive folder and this part will remain here so in the archive document we don't have any file yet and I will perform the trigger just run flow now done it should be take me to the flow and it will get the file properties and for each file hopefully it will move three documents to the archive library so once it's finished I will just show you on the library level how how it is responding so yeah now you can see that your workflow ran successfully if I go to master Docs I can only see this one document which was modified three hours ago and if you go to archive document and if I just refresh I can see that all those three documents are moved into archived documents folder also you can see that modified by and modified last modified dates it's keeping from the source so which is a good thing for marketing point of view it's still keeping all those data intact that's it for today and thank you very much for watching this video if you haven't subscribed my channel please go ahead and do so and hit the bell notification icon I will be uploading new videos on of these five topics every single week [Music]
Info
Channel: KeaPoint Tech Tips
Views: 3,169
Rating: 5 out of 5
Keywords: Archive SharePoint Files, archive sharepoint documents, archive sharepoint items, archive list items, archive sharepoint online, Power automate archive solution, archive list items in sharepoint online, archive sharepoint list using power automate, microsoft flow tutorial, power automate, microsoft flow tutorial video, power automate microsoft, power automate business process flows, keapoint, keapoint tech tips, microsoft flow
Id: aGCKTnOrr1M
Channel Id: undefined
Length: 9min 37sec (577 seconds)
Published: Thu Apr 23 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.