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.
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
• 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
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
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/.
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'.
Links
- Flow expression formulas
- Content Moderator
- Cognitive Vision
- Export and import your flows across environments with packaging
- Microsoft Flow – Advanced Error Handling – Throw in flow
- Flow expression formulas
- Content Moderator
- Cognitive Vision
- Export and import your flows across environments with packaging
- Microsoft Flow – Advanced Error Handling – Throw in flow
*This post is locked for comments