Microsoft Bot Framework: Welcoming the bots!
Interacting via bots has been around for some time now, and it’s finding its takers day-by-day. The bots are available across the messaging channels we’re already using – like Skype, Facebook Messenger, Telegram, etc. and this is one of the primary reasons for their increase in popularity. As a business owner, you could easily target the platforms your users are already on, to interact with them directly. Some bots are easy – like the one in ‘getting started’ guide, and some are complex – like the Pizza bot which was shown on the main Build stage.
We launched a new platform – the Bot Framework at Build 2016. It’s our first step towards building and connecting Bots across popular messaging services and mainstreaming ‘Conversations as a Platform’. At its core, the Bot Framework has 3 components:
- Bot Connector
- Bot Builder SDKs
- Bot Directory
Bot Connector lets you connect your bot (the one which you have already, or the one you will build using the Bot Builder SDK) to popular messaging services like Skype, Telegram, Slack, Facebook Messenger, GroupMe, text message, Office 365 email, web chat control, or your custom client (using Direct Line). There is a simple process to configure and register your bot in the bot framework portal and you’re good to go.
Bot Builder SDKs are open-sourced SDKs available for C# and Node.js, which help you build great bots.
Bot Directory is a public directory of all the bots registered through the Bot Connector – note that the directory is not available just yet – it will come soon. Once it is live, users will have one place to discover and add bots to the messaging platform of their choice. As of today, a few bots from Build are available.
I recently played with the Bot Framework and published the bot to Telegram – I was amazed by how easy it was to get started with building a bot. Here is the process I followed:
- Follow the steps on http://docs.botframework.com/connector/getstarted/
- Publish the bot to Telegram – configuration steps are given when you sign in to the Bot Framework portal, register your bot and add the channel as Telegram.
That’s it! Give this bot a try on your Telegram app. Open the app and search for @botframework_bot (Or directly go here from your mobile browser https://telegram.me/botframework_bot) . Send some data to the bot and it will return the number of characters. This is a simple bot, but usually, defining the logic of your bot is the most complex part in the entire process.
One thing to note about the Bot Framework is that it does not give you a way for user authentication within the bot (as of today). It means if you want to retrieve information about the user by asking for his username and password for a particular service – you can’t do that directly in the interaction with the bot within the current messaging platform. This is how you can do it for now:
- Generate an authentication URL and send it to your user via the bot. Ask him to login to the service using the URL.
- Once the user logs in, set up the server so that it would receive the result of that authentication (your API for the bot is now aware of the result) and if successful, you can show the relevant data to the user through the bot.
The Bot Directory currently has some bots published from Build. The list is available at https://bots.botframework.com/. One of the bots among them was MurphyBot – which you can add to Skype and ask interesting ‘What If’ questions. Here's an interesting reply:
Looks good, doesn’t it? I am sure Virat would agree.
Have fun with bots :)
Until next time,