共用方式為


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:

  1. Bot Connector
  2. Bot Builder SDKs
  3. 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:

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:

  1. Generate an authentication URL and send it to your user via the bot. Ask him to login to the service using the URL.
  2. 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:

[caption id="attachment_145" align="alignleft" width="919"]What if I was Virat Kohli? Murphy Bot[/caption]

 

Looks good, doesn’t it? I am sure Virat would agree.

Have fun with bots :)

Until next time,
Saurabh Kirtani
Twitter: @saurabhkirtani

Comments

  • Anonymous
    May 04, 2016
    Hi Saurab,Nice article.I published our jobsearch bot on Slack,Telegram & on Skype.But its been showing as "In review" from days.Do you know how many does this one require to be published to both Bot & Skype directories.Thanks,Ravichandra VydhyaTeam Lead Technology & Operations Manager O:+1 732-602-0240 Ext. 609 F: +1 877-397-1676Sapta Global Inc | SaptaProcessHRM: US +1 732-734-6957 / India +91-9700019865 | Twitter:@ravivydhyahttps://in.linkedin.com/pub/ravichandra-vydhya/53/4b9/49
    • Anonymous
      May 04, 2016
      Bot Directory is "coming soon". You can submit your bots for approval as of today. However, we cannot provide a specific schedule. An announcement will be made on their official website when the directory goes live.