Recipe: Hub sites structure visualization without coding

The result

Ingredients

  1. Microsoft Flow - one piece
  2. Power BI report - one piece
  3. Modern SharePoint Power BI web part - one piece
  4. Mikael Svenson's post - Working with Hub Sites and the search API - one piece

Preparations

Well, actually we don't need any specific preparations. Just have a cup of tea or coffee if you wish :) 

The idea is that we query all hub sites and associated sites into a SharePoint list on schedule using MS Flow. Then we use Power BI with SharePoint as a data source to read hub sites data and visualize it on a report. More...

Microsoft Flow guides: How to run a flow when a document is published?

What if you have a need to run a flow every time when a document is published in SharePoint? Out of the box SharePoint connector doesn't have "published" trigger, the only triggers are a document created or modified. 

"Send an HTTP request to SharePoint" to the rescue

While you technically can't use "Document published" trigger, you can use document updated trigger and check the status of a document using REST API. You can use _api/web/GetFileByServerRelativeUrl API to check the file state. There are some properties available for a file. The most interesting for us is below: More...

Microsoft Flow guides: improve SharePoint modern pages approvals with Azure Content Moderation

SharePoint modern pages support approvals with preconfigured Microsoft Flow. What if we want to partially automate and improve this process with some smart services, which will automatically reject approval if a page contains not appropriate content. Or add a piece of information to an approver to pay special attention to a particular page? This is a nice place for Azure cognitive services to come into the play! 

For your convenience, the whole flow in png format is available by this link

Azure Content Moderator

Azure provides a lot of different cognitive services and one of them is Content Moderator:

The Azure Content Moderator API is a cognitive service that checks text, image, and video content for material that is potentially offensive, risky, or otherwise undesirable.

Sounds interesting! To be more precise, currently Content Moderator has below core features:

  • Detects profanity in over 100 languages. It includes profane words based on a built-in list. You have an option to provide your own inclusion or exclusion lists with your specific terms. 
  • Text classification. It detects a potential presence of language that may be considered sexually explicit or adult or offensive in certain situations. Text receives classification from 0 to 1. The higher the score, the higher the model is predicting that the category may be applicable (text is offensive or adult etc.)
  • Detects Personally Identifiable Information (PII) - any presence of emails, SSN, emails, phones, addresses in text. This is sensitive information and sometimes it's not desirable to have it available publicly.
  • Image and video moderation detects adult or racy content, face detection, and some other features

That's just basics. The content moderator is able to do a lot more cool things. More...

Microsoft Flow beginners guides: how to detect that a page is a SharePoint news page

Modern SharePoint pages support built-in approval flows. While it's a cool feature, probably you don't need approval for all pages, but for news posts only. The question is how to detect that a page is a news post page? 

It turned out that it's not difficult at all! Every modern site page has a field called Promoted State. It holds information if a page was promoted as news or not. For regular site pages, the value of this field will be empty, for news post pages it will be equal to 1 (if a page is not yet published) or 2. The trick is to check the state of this field and make a final decision. More...

Microsoft Flow beginners guides: How to conditionally update SharePoint list item

Unfortunately, I haven't used Microsoft Flow in production yet. I read docs, I've tried some basic things, I saw a lot of cool presentations around MS Flow and different integration options. From what I saw and tried so far MS Flow is an extremely powerful tool to automate processes. You can do so many cool things (of course if you have enough experience)! I'm just exploring and in this post, I'm going to build a very simple Flow, which updates a SharePoint item based on different conditions. When SharePoint item is created, it will check the item's field and update the same item based on a condition. 

Here is our resulting flow:

More...