Microsoft Flow that's used in this demo - it uses an Azure Function to extract text from a doc, which is then sent to Text Analysis, and finally written back to SharePoint. In the end, it sends notifications of the status of the run.

How to Resolve Managed Metadata Madness in SharePoint?

Using Azure Functions and Cognitive Services Text API to enrich a Flow that fills Metadata for new items in a Modern SharePoint Team Site. That’s, in a nutshell, the solution I submitted to a recent online hackathon. Quite a mouthful, isn’t it? The whole solution (and a public vote, if you’re interested!) is available here: – this blog post will describe the solution and the reasoning behind it.


Some time ago my manager asked me to take a few weeks off, since I had accrued quite a lot of overtime during the hectic months working for Valo. I got bored quite quickly, so I was pretty happy to encounter an online hackathon organized by Devpost. I wasn’t aware of them beforehand, but they seemed to have hosted quite a few interesting hackathons before. Some of which quite interesting, I might add! This prompted me to also take part into a hackathon they were just hosting: “Work smarter, not harder with Office 365.”

I’m not a huge fan of hackathons, but the topic was too good to miss, so I submitted a solution I’d been thinking about implementing, but didn’t have a good enough reason to implement it for customers.

Description of the issue

So, which issue am I aiming to solve? Let’s see… 

  • The amount of data is surging (~90% of the data in the world has been created in the last 2 years)
    • To ensure that data in organizations is useful, you need to make sure, that your users find it easily!
  • A great “Enterprise-y” solution has been metadata tagging!
    • However, users generally hate doing that manually
    • Automatic solutions are either cumbersome to maintain, expensive to develop, or both
    • Many required metadata fields will cause users to migrate to shadow IT solutions (like DropBox) – or not use any collaboration solutions at all!

Resolving Managed Metadata Madness in SharePoint
Fig. 1: Resolving Managed Metadata Madness in SharePoint – in one Flow!

The Solution

Using Azure Functions and Cognitive Services Text API to enrich a Flow that fills Metadata for new items in a Modern SharePoint Team Site. Cool solution with fun new tools!

  • We’ll be using Modern Team Sites in SharePoint for document storage. That enables effortless collaboration in the cloud!
  • SharePoint’s Search is decent, but thorough metadata tagging makes it a lot more useful.
  • Using Azure Cognitive Services we can fill the metadata fields automatically – without any user interaction at all!
  • Users can find the content, and hence will be happy! 🙂

So essentially, what happens is, that this Flow automates metadata tagging for SharePoint Online. Like in the graph (Fig. 1), these are roughly the steps:

  1. User uploads a document
  2. This fires a Flow attached to Document Library
  3. The Flow will call the Azure Function that’ll do the heavy lifting
  4. An Azure Function will run, extract text, and analyze it using Azure Cognitive Services
  5. The Azure Function will then write the info back to SharePoint Online
  6. Finally, notifies admin of the execution and the creator of the file.

There’s a larger description and a demo video (in case the demo is not visible on the hackathon demo page, see it below! The actual demo starts around 3:10, it’s mainly issue and solution description before that) available on the hackathon website:

The following two tabs change content below.

Antti K. Koskela

Solutions Architect / Escalations Engineer at Koskila / Norppandalotti Software / Valo Solutions
Antti Koskela is a proud digital native nomadic millenial full stack developer (is that enough funny buzzwords? That's definitely enough funny buzzwords!), who works as a Solutions Architect for Valo Intranet, the product that will make you fall in love with your intranet. Working with the global partner network, he's responsible for the success of Valo deployments happening all around the world. He's been a developer from 2004 (starting with PHP and Java), and he's been bending and twisting SharePoint into different shapes since MOSS. Nowadays he's not only working on SharePoint, but also on .NET projects, Azure, Office 365 and a lot of other stuff. This is his personal professional (e.g. professional, but definitely personal) blog.

2 thoughts on “How to Resolve Managed Metadata Madness in SharePoint?

Let me know your thoughts!