I won a hackathon! They had fun topics, it was a cool challenge, a well organized event, and had cool prizes. Since this is the first hackathon I ever took part in, I thought I’d post something about my experience and the solution(s) I figured out.
For a TLDR-version of just the winning solution, click here!
I recently took part in a fun hackathon organized by DevPost for Microsoft. Earlier, I posted some info about my hackathon entry, How to Resolve Managed Metadata Madness in SharePoint? I had played around with Flows and Cognitive Services before, but this was the first time I merged them together with SharePoint to actually fulfill a business case instead of just testing what’s possible.
Turns out my submission matched the hackathon topic quite nicely, and landed me a 3rd place finish in the hackathon! Out of 54 submissions, some of which were just plain awesome, I’m quite happy with the results! 🙂
Since it was a fun experience, I thought it might be worthwhile to document the solutions and the process – it was my first hackathon after all. It produced a number of blog post topics and some reusable code samples, too – and I’ll use parts of the experience in my upcoming sessions in different SharePoint community events!
Choosing the topic
I ended up submitting 2 different solutions, because I was so inspired by the topic (or maybe because I had some related bits and pieces of code already laying around, who knows?)
First, let’s go through my non-winning submission.
Building a better context in Teams
I had already built a POC for a simple Teams tab, that uses the authentication from your client and uses your permissions to get information from the Graph API, to better establish the context of the channel. I further refined the solution to include more info, but I’ll readily admit it was a really simple submission. It didn’t win anything or even get any comments (bummer) – but was still a fun thing to hack together!
All in all, a fun but quite a simple submission. You can see the details and a demo here! !
Then, the solution that actually kind of won.
Resolving Managed Metadata Madness with Microsoft Flow, Azure Cognitive Services and Azure Functions
I had built a demo some time earlier for using the (nowadays deprecated) Azure Cognitive Services’ Text Analytics -API’s Topics -feature to figure out the keywords for documents just in general. With the publishing of Microsoft’s awesome integration tools – namely, Flow for easy workflow-kind of integrations and Azure Functions for code-first integrations – it’s nowadays really easy to bolt an idea (just the idea – the whole code had to be rewritten because the SDK had changed and topics-api been deprecated) to SharePoint Online Document Library. Instead of using an external library for extracting text from different documents, you could use Azure Cognitive Services OCR.
But what was the whole idea about?
I decided to solve an issue that I’ve seen many organizations struggle with. The findability and classification (or tagging) of content on SharePoint.
This issue is typically resolved by Managed Metadata, which is a very enterprise-y solution to the issue. Many required metadata fields, however, will cause users to migrate to shadow IT solutions (like DropBox) – and nobody wants that!
In short, my solution was about 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 is a mouthful alright! In essence:
- Using Modern Team Sites in SharePoint for document storage enables collaboration
- SharePoint Search is decent, but thorough metadata tagging makes it a lot more useful
- Using Azure Cognitive Services and Azure functions we can figure out and fill the metadata fields automatically – without any user interaction at all!
- End result: Content will be found and users will be happy 🙂
So, step by step, the solution works as follows:
- A Flow attached to Document Library will call the Azure Function that’ll do the heavy lifting
- An Azure Function will run, extract text, analyze it using Azure Cognitive Services, and then write the info back to SharePoint Online (Flow doesn’t support taxonomy fields, so the Azure Function is needed)
- Finally, the Flow notifies admin of the execution and the creator of the file.
All in all, quite straightforward! Oddly enough, the single most time-consuming step was getting the darn taxonomy field to work!
Winning (and claiming the prize)!
Ah, I’m definitely going to call the 3rd place finish a win. This is actually the first hackathon I’ve ever taken part in, and getting a prize and recognition out of that was super fun. I also got great feedback and suggestions from the community – both before and after submitting – so the hackathon definitely turned out to be valuable in that sense, too!
In addition to that, the hackathon organizer DevPost was pretty great! Not only is their concept and website pretty good, they also offer great support to participants. I had actually messed up my demo at one point (authentication had expired, since I was recycling earlier app credentials), but they gave me the opportunity to fix that.
Even their support in figuring out what to do in regard to Finnish taxes (yeah, I’m a sucker and pay taxes for even random income) was great. Got everything sorted out without any extra pains.
Latest posts by Antti K. Koskela (see all)
- SharePoint Localization – a (somewhat) comprehensive how-to! - July 18, 2018
- How to enable custom scripts for a SharePoint site collection? - July 16, 2018
- Fixing issue “AADSTS70005” by enabling the implicit authentication flow for your Azure AD app - July 11, 2018
- How to show more than 30 categories in SharePoint blog/news sites? - July 9, 2018