Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Updating QnA Maker knowledge base via SharePoint Online using Logic Apps!

After reviewing the existing flow we decided to help them build a proof of concepts using Azure Logic Apps and long and behold our customer was in shock on how easy it was to complete this task and how flexible this great Azure offering is (As a long time fan since early inception I was not surprised!)

Our very first step was to leverage QnA Maker API and build/validate couple of PUT, PATCH operations against their staging knowledgebase using Postman:

Next we created a logic app and started by leveraging a Sharepoint Insert/Updated trigger using exiting SharePoint connector to have knowledge base updated for each insert or update to the SharePoint list! by leveraging the HTTP connector and using QnA API :

As shown above a simple condition rule (checking if Created column equals to Modified) allowed us to cover both insert and update flow within one logic app!

While insert was an easy task the challenge came up with updating the entries in knowledge base. By design each entry is assigned an id in which needs to be used when doing a PATCH to correctly update the right QnA entry within targeted knowledge base and to do this we ended up defining a dependency between each SharePoint list item (SharePoint list item id ) as a metadata during insert and use the same metadata (sp_id) to get the right item on knowledgebase for update operation!

To query the knowledge base we ended up using Download Knowledgebase operation and used Data Operation connector to parse and query JSON and pick the right item with checking the value of sp_id metadata and then make the update using Update Knowledgebase operation!

And of course notifying the user via Teams or Email!

To further enhance the process we proposed implementing an Azure Function to be used instead of data connector and provide better performance specially with large knowledgebase repositories!

And there you have it Azure serverless (Logic Apps and Azure Function saving the day yet again!)

Share the post

Updating QnA Maker knowledge base via SharePoint Online using Logic Apps!

×

Subscribe to Msdn Blogs | Get The Latest Information, Insights, Announcements, And News From Microsoft Experts And Developers In The Msdn Blogs.

Get updates delivered right to your inbox!

Thank you for your subscription

×