cancel
Showing results for 
Search instead for 
Did you mean: 
darogael

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'. 
 
 
About the Author
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • I am a Microsoft Business Applications MVP and a Senior Manager at EY. I am a technology enthusiast and problem solver. I work/speak/blog/Vlog on Microsoft technology, including Office 365, Power Apps, Power Automate, SharePoint, and Teams Etc. I am helping global clients on Power Platform adoption and empowering them with Power Platform possibilities, capabilities, and easiness. I am a leader of the Houston Power Platform User Group and Power Automate community superuser. I love traveling , exploring new places, and meeting people from different cultures.
  • Read more about me and my achievements at: https://ganeshsanapblogs.wordpress.com/about MCT | SharePoint, Microsoft 365 and Power Platform Consultant | Contributor on SharePoint StackExchange, MSFT Techcommunity
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • Founder of SKILLFUL SARDINE, a company focused on productivity and the Power Platform. You can find me on LinkedIn: https://linkedin.com/in/manueltgomes and twitter http://twitter.com/manueltgomes. I also write at https://www.manueltgomes.com, so if you want some Power Automate, SharePoint or Power Apps content I'm your guy 🙂
  • I am the Owner/Principal Architect at Don't Pa..Panic Consulting. I've been working in the information technology industry for over 30 years, and have played key roles in several enterprise SharePoint architectural design review, Intranet deployment, application development, and migration projects. I've been a Microsoft Most Valuable Professional (MVP) 15 consecutive years and am also a Microsoft Certified SharePoint Masters (MCSM) since 2013.
  • Big fan of Power Platform technologies and implemented many solutions.
  • Passionate #Programmer #SharePoint #SPFx #M365 #Power Platform| Microsoft MVP | SharePoint StackOverflow, Github, PnP contributor
  • Web site – https://kamdaryash.wordpress.com Youtube channel - https://www.youtube.com/channel/UCM149rFkLNgerSvgDVeYTZQ/