cancel
Showing results for 
Search instead for 
Did you mean: 

Use Flow to Moderate SharePoint Image or Picture libraries

Introduction
The potential of SharePoint is abundant and now with Flow you can do even more. However, with more power comes more responsibility and this is where Cognitive Service's can help. In this blog we'll see how the Computer Vision and Content Moderator connectors can help monitor the images that are uploaded to SharePoint libraries buy tagging them and also identifying those that are either racy or adult.
 
Requirements
 • SharePoint Online or On-Premises Image library. For SharePoint On-Premises you will need gateway installed and connected.
 • A Microsoft Flow subscription
  ○ In Flow you will need the following connectors
Capture.JPG

Step #1 - Import the SharePoint STP file
Download the SharePointContentModeratoryLibrary STP file, unzip it and then use it to create the Images library for your SharePoint Online or On-Premises site. If for some reason you are not able to or allowed to use this STP file then here is a screenshot of the columns I have used. You can start by using the Picture Library app and then add the remaining columns.
Here is what a picture library icon looks like
Capture3.JPG

Here are all the columns you will need
 
Capture2.JPG

Step #2 - Confirm the connections are ready
You will need to have all four connections for this Flow to work. The Content Moderator and the Computer Vision API will need keys and the Site URL.
You can signup for Content Moderator for free to test drive it's potential and get the connector key and URL. Click Here for more information
https://contentmoderator.cognitive.microsoft.com/
Cognitive Vision is part of Azure. For testing purposes the free credits should suffice. You will also need a key and URL for the connection. Click here for more information
https://azure.microsoft.com/en-us/services/cognitive-services/computer-vision/?v=18.05
 
Step #3 - Import the Flow using the Zipped file
Download the SharePointContentModeratoryFlow zip file. DO NOT UNZIP IT. Follow the 'Importing a Flow' steps provided in this walkthrough blog on 'Export and import your flows across environments with packaging' https://flow.microsoft.com/en-us/blog/import-export-bap-packages/.
 
Video
This video will demonstrate how the SharePoint Content Moderator works. It also shows where to get the URL and Keys for both Content Moderator and Computer Vision API to create the connectors.
 
 
Conclusion
From time to time I have noticed my Flow will sporadically fail regardless of the image file type. If you encounter the same then you can simply restart the flow and it should complete. If you need to seem to face this issue more often and need a workaround then you can refer to Pieter Veenstra's article on 'Microsoft Flow – Advanced Error Handling – Throw in flow'. 
 
 
Meet Our Blog Authors
  • Co-founder of https://plumsail.com, Office 365 and SharePoint expert. Passionate about design and development of easy to use, convenient and flexible products.
  • Microsoft Business Apps MVP. Owner of ThriveFast, an Office 365 consulting company.
  • 7x Microsoft Business Solutions MVP (CRM)
  • Solution Architect with Slalom, and organizer of the Boston Office 365 User Group, and long term SharePoint/Office 365 veteren. Find more at http://www.davidlozzi.com. Follow @DavidLozzi
  • I'm keen in MS technologies, SharePoint, Office 365 and development for them
  • Michelle is an Office 365 solution architect in Twin Cities, MN. She has been delivering business collaboration solutions for years with her focus on SharePoint and Office 365. Michelle is a recent board member of the Minnesota Office 365 User Group and has been a member of the SharePoint community since 2009. She is a frequent speaker at MNSPUG and SharePoint Saturday and co-chaired the Legal SharePoint User Group for 4 years. Her most frequent projects have involved rolling out a large deployment of Office 365, SharePoint Online intranet, build of a "CHAMPS" Office 365 user adoption program and most recently, SharePoint On-Premise to Online Migration. Michelle is very excited about cloud technology as it is shifting her IT Pro focus to collaboration strategy and technical adoption.
  • I'm a Microsoft Office Servers and Services MVP with a special interest in SharePoint, Office 365, Microsoft Flow, Microsoft Teams and PowerApps. I work at Triad Group Plc ( https://triad.co.uk)
>