Cortana Bot

A custom Cortana Bot can be developed and added pretty easily. The Bot can be used locally (local debugging), for a restricted audience (e.g.: to a specific Microsoft Account) or in public through the Microsoft App Store.

Cortana only?

An Azure Bot is not only bound to Cortana. Cortana is just one distribution channel. Other channels would be, for instance:

  • Direct Line
  • Web Chat
  • Teams
  • Skype/Business
  • Email
  • Facebook Messenger
  • GroupMe
  • Kik
  • Slack
  • Telegram
  • Twilio (SMS)

In addition, a bot isn’t bound to just one channel. Thus, every desired channel can be added on demand. (Probably requiring a higher configuration effort)

Installation

Login into your Azure Portal and create a Web App Bot.

Web App Bot

Add your desired channel(s). In my case: Cortana

Channel Overview

Click on „Edit“ to upload an icon and to add the bot to your Cortana. (Connect to Cortana) The bot magically appears in your personal cortana.

Data Overview

Copy and remember MicrosoftAppPassword,  AzureWebJobsStorage and  MicrosoftAppId which is required later on. Click on „Build“ to download a .zip of your bot. Extract the bundle and check it into a VSTS project. (If you don’t have a VSTS account, create one for free, or use GitHub/Lab instead)

Continuous Integration

Enable Continuous Integration in „Configure continuous deployment“ by selecting the repository of your choice. Once done, a commit in your repro will automatically upload the source-Code change to your online bot. Edit: For a single push, without continuous integration, right-click the project and select publish. The username + password to publish your changes can be found in Azure.

Step 1

Step 2

Publish Information

Configuration

Web.config

Add the MicrosoftAppId, MicrosoftAppPassword and AzureWebJobsStorage values into the Web.config file.

If you tend to add/change or update any NuGet package, remove all hard dependencies in the .csproj file. (MS did reference some files statically, instead of using directly a NuGet)

Static References to remove

E.g.: If you plan to upgrade Microsoft.Net.Compilers, remove its dependency from the .csproj

You are now ready to develop + deploy your bot 🙂

Bot Emulator

Instead of uploading each change over and over again, a bot emulator can be used for local debugging. Create a new configuration with following setup:

Configuration Setup

Bot Entry

Once added and configured, an entry in the Endpoint section is visible. Click the entry to open the emulator. Local communication is up and running and ready for testing.

Link Collection

Schreibe einen Kommentar

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.