How to create your own Q&A bot for Microsoft Teams without code
Yesterday at SharePoint Saturday Munich I had the pleasure to attend Wictor Wilén’s session on extending Microsoft Teams. In this session Wictor showed some great demos and even announced the availability of a Yeoman generator for creating new Tabs in Teams (http://www.wictorwilen.se/yo_teams-tab).
Wictor’s talk inspired me to give the Microsoft Bot Framework a try and so I started creating a bot in my Azure tenant by the guidance of this blog post: Create BOT from FAQ page with no coding — QnA Maker as new member of Cognitive Service.
After some initial questions in the QnAMaker you end up on a screen where you can point your bot to a existing FAQ on a public web page or you can upload a document with an existing FAQ in hand. A third option is something like a online editor for your questions and answers. That’s what I did by entering some questions and answers from our internal OneNote at Solvion:
Time to train. I remember some courses at the university about artificial intelligence and how we can train an algorithm to impress us with the right answers. So I played around a little bit with the AI by using the built-in test tool. You can use this dialogue to tell the bot if the answers it servers are correct or if there is a better one in the FAQ.
You can see the different answers that the bot thinks are right on the left side. By changing the answer you can train the bot for better results.
The next thing is to publish your bot to Azure because until now we are only working in the QnAMaker. The first time you hit the publish button you need to save a generated password, save it somewhere you will need this later.
Azure Bot Service
As your QnAbot is now published it’s time to create a bot service connected to it in Azure. Just follow the guidance in the MSDN blog from above and you will end up with an azure bot like this:
You can change the code or you can just try to connect this to Microsoft Teams under the channels tab:
The Microsoft Teams channel
This page lists the different services you can connect your bot with. In this post, we focus on MS Teams. If you just click on this button Microsoft Teams client opens and you are chatting with your bot and can start asking questions:
An admin is able to prevent you from using bots in Microsoft Teams by tweaking the right settings. But as Wictor mentioned, just copy the GUID of your bot into the top left search field in the chat area of Teams, guess what, your bot shows up. To be honest I expect this to change as soon as Teams hits GA.
Thanks again to Wictor and his great session yesterday, really inspiring!
Update 06.03.2017: During a short recap of the SharePoint Saturday this morning with my colleague Bernd, we just added the channel for Skype to the bot and up and running we are 😉
If you are interessted in Microsoft Teams also check out the following blog posts: