Showing results for 
Search instead for 
Did you mean: 

Use Flow to Moderate SharePoint Image or Picture libraries

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.
 • 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

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

Here are all the columns you will need

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
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
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'
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.
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
  • 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.
  • MCT | SharePoint, Microsoft 365 and Power Platform Consultant | Contributor on SharePoint StackExchange, TechCommunity
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • 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) 12 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 #Office365 #MSFlow | C-sharpCorner MVP | SharePoint StackOverflow, Github, PnP contributor
  • Web site – Youtube channel -