Ever hear feedback from your users that they wish there were easier ways to manipulate documents in Office 365 for their business processes? This is a common use of Office 365 that many organizations have also utilizing via SharePoint server for many years.
Beyond using record management features in SharePoint, utilizing metadata to trigger moves, deletions and other actions against documents use to require a fair deal of time in SharePoint designer or using a third party tool from companies like Nintex, K2 or AvePoint.
With Flow, this is now a relatively simple process, that takes only a few minutes to set up for any given list or library in Office 365- and don't forget you can copy and re-use your Office 365 Flows to apply to multiple locations!
Before I start throwing in some screenshots and line by lines, here are a few tips to remember:
Ok great!
So let's dive into it!
Start by opening flow.
Select the "Create from blank" Option, and select the "When a file is created or modified (properties only)" option.
Choose the site Address, SharePoint Library Name and Folder where you'd like to enable users to manipulate documents via metadata triggers.
For the "Documents" Library under a SharePoint site, you'll want to select the "Shared Documents" folder under the "Documents" Library. If this is a Team, within the Shared Folder you should see folders that correspond with the channel names within the Team (See ex. Below).
Once you choose the appropriate folder, then choose "Add a Condition."
As the Dynamic Content appears, choose the Dynamic Content that corresponds to the forma of "Column Name Value"
For the example of the library below, the dynamic content is "Action Value" as the column name we will be using for this example is "Action"
Within the "Action" Column, I've added the Value Type Choices corresponding to the actions I'd like to take. For your organization, the actions that the column values will trigger should be ones that are very clear and easy for your business users to understand. You may even want to include reference documentation and a policy for how to use them to add a layer of accountability to the process.
OK, so here's where things get a little tricky.
Once you've added the condition, add the "If Yes" action. You'll want the action to correspond with the option you've added to the Condition. Here, I'm saying if the Value is Delete, then delete the file with corresponding File Identifier. (This could enable users with low access levels to delete files if desired, using the access level of the account that authenticated the Flow).
In the next step, in the "If No" area, I've added another condition. If the previous condition is not met (if the "Value" for Archive is NOT DELETE) then I select the next Value, here "Move To Archive" and then add the next action. Because there is no "Move" action in SharePoint, I'm going to Copy then Delete the source file in question. You'll need to be certain to use the Dynamic Content from the proper action (here from the first step, "When a file is created or modified (properties only)"
You'll also want to be sure to use the dynamic content that the corresponding filed requests- the "*File Identifier" gets the Identifier dynamic content from the file in question.
Continue to add sub conditions for each desired in the "If No" condition area for each step until you've build all the conditions into the flow. When you're done, you can simply leave the last "If No" area blank.
Success! It worked perfectly! When I selected the "Delete" Option, the file was almost immediately deleted! This surprised even me!! …Great!
There you go, now go try for yourself, and don't forget you can do so much more than just move and delete content- using the connectors in Office 365 I've used this function to publish content to external sites on other platforms, move files into BLOB storage, Sync locations- and trigger any other kinds of workflows you'd like using all the power of Flow at your disposal!