How to connect a Microsoft Framework Bot to a Microsoft channel (e.g. Cortana, Skype)

In a previous post I spoke about connecting a Bot with a third party channel (i.e. Facebook Messenger).

Connecting a Bot to Microsoft’s specific channels is even easier because you do not need to create/add specific tokens. In his post I will take into account Cortana and Skype channels.

Cortana channel

To add the Cortana channel, you only need to configure a few things, among them the Invocation name you have to use when talking with Cortana.
Note that you must use your Microsoft personal Account (the one you use to login into your PC, and not a possible company Microsoft account using your firm LDAP for authentication … otherwise you cannot connect a bot to Cortana. Moreover you will be able to launch that bot with Cortana, from a device where you are logged with the same your Microsoft personal account. Moreover, as I will point out, it seems to work only with the English Cortana version (at least for my experience and possibly for the time being).

Add the Cortana Channel to a bot (e.g. testEnzoA)

Add the Cortana Channel to a bot (e.g. testEnzoA)

Settings required to add the Cortana Channel to a Bot

Settings required to add the Cortana Channel to a Bot

Ones the Cortana channel is running (green Running word on the Health column), you can ask Cortana on yout PC to run the bot (e.g. saying: “run ‘bot name’ ” … in my case ‘run test‘ having chosen the word ‘test’ as Invocation name for my bot.

Note that I succeeded to make it work on my PC with Windows 10 in English (even though the region is set to Italy), while on my Surface, with Windows 10 in Italian and being logged with the same my Microsoft personal account, it seems not recognize any command I do to run the bot: Saying, for example “Lancia ‘botname’ ” (e.g. “lancia test“) Cortana asks what local app I want to run or it launch one whenever there is an installed one with a name closed to that bot name. May be could be a current limitation of Cortana in languages other than English, but possibly I am using a wrong command …
I did not succeeded to fine that list for languages other than the one for en-us : that page is neither available in different languages, other than English. I tried to translate the same words from that English list in Italian … but I never will be sure that they are the expected translations … The only page related how to use Cortana in Italian seems to be this page , from the help support site, containing only a short video in English (being only a translation of an English original page)!!

In the following there are some screenshots I took launching my example ‘test’ bot with Cortana on my Windows 10  PC (set with English as Windows display language): I simply asked “Run test“. Only the first time she ask me the permission to connect with provaB2 bot. Then, every input I give to Cortana is processed by that bot (that simply reply “You said: ‘same phrase’

Cortana asks the user permission to connect with the requested bot (only the first time you call it).

Cortana asks the user permission to connect with the requested bot (only the first time you call it).

All the input from the user is processed by the remote bot and Cortana shows the bot response.

All the input from the user is processed by the remote bot and Cortana shows the bot response.

As for every bot, you can manage each connected channel using either the Bot Framework site (MyBots section) or the Azure portal (where you deployed your bot).

Management of the bot using the Bot Framework portal

Management of the bot using the Bot Framework portal

Azure Bot Service console where you can test your bot, edit or download it possibly enabling continuous deployment with a source control provider (e.g. Visual Studio Team Services or GitHub)

Azure Bot Service console where you can test your bot, edit or download it possibly enabling continuous deployment with a source control provider (e.g. Visual Studio Team Services or GitHub)

_____________________________________________

If don’t necessarily want to use Cortana as a possible channel for your Bot, but your intent is more to build a speech-enabled Bot with Cortana skills, whenever are the used connected channels, in the following there are some useful links:

____________________________________________________

Skype channel

PS: see also Skype Bots Succintly by Ed Freitas, free eBook from Syncfusion (eBook and source code).

The Skype channel is added by default as soon as you register a bot in the Bot Framework portal but to have it added as a contact in your Skype account, for testing purposes, you need to click on the Skype link and accept to have it: on the contrary, if you click on the Edit link on the right, you will be able to get some code (Web Control) to lets you embed the bot in your own website or to stat the publication process that requires a review of the bot. If approved it will be considered in Skype bot directory (unless you have selected the option to Hide from Directory). Bots in Preview are limited to 100 contacts. If you need more than 100 contacts, you need to Publish your bot and then distribute it to unlimited users via a URL or button.

To connect the bot as a contact to your Skype, click that Skype link

To connect the bot as a contact to your Skype, click that Skype link

Accept to add it to your Contacts

Accept to add it to your Contacts

The test bot is then added in my contacts

The test bot is then added in my contacts

To find the test bot, you can possibly click on the contacts icons on the right ot the Search box (just on the right of the magnifying glass) and then select the Bots tab.

The only way I found to let other contacts of mine try to use the test bot, is to share it from its profile page:

Share the Bot with some other contacts of you (1)

Share the Bot with some other contacts of you (1)

Share the Bot with some other contacts of you (2)

Share the Bot with some other contacts of you (2)

Share the Bot with some other contacts of you (3): this is what it is sent to the selected contact that have to click to that provided icon link to add the bot in his contacts too

Share the Bot with some other contacts of you (3): this is what it is sent to the selected contact that have to click to that provided icon link to add the bot in his contacts too

Note that to start the publication process you need to provide the URL of Privacy statement an Terms of use. Moreover, even though the publisher country can be set to Italy, there is not the support for the Italian language (only for English, Russian, Portuguese, Spanish seems to be supported for the time being).

You need to provide Privacy statement an Terms of use URLs

You need to provide Privacy statement an Terms of use URLs

I noticed that, after some hours nobody use a bot (e.g. my test bot provaB2) it answer to the first request after a lot of time (even 15 seconds or more) … as it was discarded and then recovered from the memory. Then, it started again to answer nearly in real time … I noticed this kind of delay only with the Skype channel and it should be investigated furthermore.

 

 

 

Pubblicità

Informazioni su Enzo Contini

Electronic engineer
Questa voce è stata pubblicata in Aziendali, Review e test, Windows. Contrassegna il permalink.

2 risposte a How to connect a Microsoft Framework Bot to a Microsoft channel (e.g. Cortana, Skype)

  1. Winrock ha detto:

    Itreally a cool and helpful piece of info. I am happy that you shared this helpful information with us. Please stay us up to date like this. Thank you for sharing.

    "Mi piace"

  2. Pingback: How to connect a Microsoft Framework Bot to a third party channel (i.e. Facebook Messenger) | Enzo Contini Blog

Lascia un Commento/Leave a comment

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo di WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...

Questo sito utilizza Akismet per ridurre lo spam. Scopri come vengono elaborati i dati derivati dai commenti.