Earlier, we created a new series called Chatbots starting with: What is a Chatbot and how does it work, in that we understood the different types of chatbots like
- Conversational Chatbots
- AI-powered Chatbots
- Task-Oriented Chatbots
And we also came to know the various platforms that support custom Chatbots. We shall deploy the Microsoft Teams bot in Azure Cloud and test in the web chat in this article and the SDKs used to develop the same.
Create a boilerplate code using the Teams Tool Kit
Using the Teams Tool kit, create a basic code that would work locally for simple input messages like ‘welcome’ or ‘learn'.
Provision and Deploy the code to Azure using the Teams Tool Kit
-
In the same solution where you created the basic chatbot code, open the Teams Tool kit extension.
-
Make sure you have logged in.
- Microsoft 365 account for MS Teams
- Azure Cloud portal
-
Click on the Provision under the section Lifecycle.
-
Select the right subscription you want to use for the bot deployment.
-
Now, you can choose an existing resource group, or you can create a new resource group with the location to deploy all the resources that are required for this chatbot. The resources created by default would be.
- Azure Bot service
- Azure App Service
- Azure App Service Plan
- Azure Managed Identity(optional – can be chosen if auth is required via AAD)
-
Confirm the provisioning of resources.
-
Once successfully provisioned, Click on Deploy under the section Lifecycle.
-
Once confirming the deployment, the bot will be ready in the Azure Cloud.
-
The confirmation on the deployment can be verified on the output window in the Visual Studio Code.
-
Verify the resources provisioned and deployed in the Azure cloud by navigating to the Resource Group created (or used for deployment).
To test the deployed bot, go to the Azure Bot resource and click on the Test in Web Chat from the left panel under Settings.
While this chatbot is a basic sample bot, you can create additional functionalities like weather bots, currency converters, simple calculators, FAQs, and so on.
If you are interested in a more specific solution in this regard, please leave a comment below.
Please see this is a follow-up from the series Chatbots.
- https://www.c-sharpcorner.com/article/what-is-a-chatbot-and-how-does-it-work/
- https://www.c-sharpcorner.com/article/create-a-telegram-bot-using-node-js/
- https://www.c-sharpcorner.com/article/create-a-microsoft-teams-bot-using-node-js/
Happy Coding! Thank You!!