Create Azure Bot Service

Open Visual Studio and select File, then New, then Project Choose Template Echo Bot


In the New Project dialog, select the Bot Builder Template, name the project StockBot and click OKThe project will be created as below.


Open StockBot.cs and refer OnTurnAsync method. This method will be called whenever the end-user communicates with the BotService



The Stock Bot will ask user to enter the Ticker of Stock to show the stock details. To achieve it add a Service call to get the Stock details. For this example I have created a Web API Service using ASP.NET Core 2.2 and hosted in Azure. The below code will consume the Service and return the Stock Details for the Ticker. How to create a WebAPI and Host in Azure will be provided in a different DIY article in my Blog.


Make the below change to OnTaskAsync Method. This will prompt the user to enter the Ticket of Stock


Test the StockBot locally using Emulator. If not installed Bot Framework Emulator v4 (latest version available as of now!)


Open the Emulator and choose the file from the Project folder path as showed below.


Open the file.


Leave the Microsoft App Id and Microsoft App Password blank and click Connect. The Emulator will show a screen as showed below.


Enter the Ticker of your stock. Eg: AAPL


StockBot prompts user to enter next TickerFurther you can enter multiple Ticker to test the Bot service.


What’s Next? Deploy StockBot to Azure and integrate to Website and Skype.



Technical Lead for Microsoft Technologies especially in Azure, ASP.Net and in Angular JS.

Posted in Azure

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s