Create and Deploy a Healthcare Chatbot with Azure Health Bot: Step-by-Step Guide
Tags: azure, mentalhealth, tutorial, chatbot
Published: 2024-02-25 22:46:56

In this blog, you will learn how to create a Healthcare chatbot and how to deploy it to a website in some very simple steps.

> No Programming/Coding background is needed!

### Prerequisites:

An Azure subscription.

- If you don’t already have one, you can sign up for an [Azure free account](https://azure.microsoft.com/?wt.mc_id=studentamb_71460).
- For students, you can use the free [Azure for Students](https://aka.ms/Azure4StudentsActivate) offer which doesn’t require a credit card only your school email.

### Summary of the steps:

Step 1: Open your Azure Portal and Sign in
Step 2: Create an Azure Health Bot Instance
Step 3: Create a Mental Health Bot using templates
Step 4: Deploy it to the internet and use its Endpoint

## Step 1: Open your Azure Portal and Sign in

1. Go to the [Azure portal](https://portal.azure.com) and sign in.

    ![Sign in Image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mudkkihmwvj0gwwjqkcu.png)

2. Choose your preferred account and proceed.

    ![Azure portal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gp7a82tvr4bezcyxc87b.png)

Now you are inside the **Azure portal**!

## Step 2: Create an Azure Health Bot Instance

1. Search for Azure Health bot and select it.

    ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lsscld56898w0qnajmqb.png)

2. Select Create to create a new instance from the service.

    ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mlpsejg7ub1et391fttg.png)

3. Perform the following tasks to create the resource:
    - Select an **Azure Subscription** (learn more: [here](https://learn.microsoft.com/microsoft-365/enterprise/subscriptions-licenses-accounts-and-tenants-for-microsoft-cloud-offerings?view=o365-worldwide#subscriptions?wt.mc_id=studentamb_71460))
    - Select a **Resource Group** (learn more: [here](https://learn.microsoft.com/azure/azure-resource-manager/management/manage-resource-groups-portal?wt.mc_id=studentamb_71460))
    - Enter a **Name** (Unique name that matches the constraints for naming on Azure)
    - Select a **Region** (Choose the region closest to you and your customers)
    - Select a **Plan** (learn more: [here](https://azure.microsoft.com/pricing/details/bot-services/health-bot/?wt.mc_id=studentamb_71460))

     ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nzxyo0ohwl2r7rwz02zk.png)

4. Select **Review + Create**.

5. Wait for the deployment to finish then select **Go to resource**.

    ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sy25gfb8fqi1joie1rnl.png)

## Step 3: Create a Mental Health Bot using templates

1. Navigate to the health bot management portal using the **Management portal** link.
    
    ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m8wgcekyph8yjzvtgae2.png)

2. Select **Template catalog** from the left side menu to navigate to the available templates.

    ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fnc4j971yt0rdrz7jx7j.png)

3. Here, you can find multiple templates that can be used to create a separate chatbot or even build your custom template.

4. Scroll down and select the **Mental Health screener** template. 

    ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mncnzqt4xjlrxeg3rvi6.png)

5. Select **Import** from the pop-up window.

    ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r47tiq8jon7vvb7dq53c.png)

6. Test it from the chat window on the bottom right of the screen.

    ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7a86r90abh1zqdeutbfo.png)

Congratulations you have created your first healthcare bot!!

## Step 4: Deploy it to the internet and use its Endpoint

1. Fork this GitHub repository [github.com/microsoft/HealthBotContainerSample](https://github.com/microsoft/HealthBotContainerSample) it's a simple deployable container website that allows users to communicate with the Azure Health Bot through Web Chat.

    ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/opmok2jknn2h46wj6rca.png)

2. Select **Deploy to Azure** after you create a fork from the repository's readme.

    _No need to edit anything in the repo!_

    ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zcy6sroc74m9v7ek7qm5.png)

3. Select the same resource group you used for creating the Azure health bot.

    ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bz2jyc8bje1xnvonuxmr.png)

4. Add your chatbot credentials which are the **App Secret** and the **WebChat Secret**.

    ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p1jys8860nlz24di94ya.png)

5. You can find the secrets required inside the Azure health bot management portal under the **Integration** tab from the left side panel then choose **Secrets and Keys** and scroll down.

    ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h5u8wrhzcrwszo6oh2wp.png)

6. Select **Review + Create**.

    ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ex6yxqqdfizbcn33z6of.png)

7. Select **Create** and wait for the provisioning to finish.

8. Open the Web App page and get the **Default Domain** name.

    ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6dl8c1vvsn6oi6vithnr.png)

9. Test the deployed website and share it with others to test it and give you their feedback!

    ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gzgu1nma2pyyauougtkc.png)

Thank you for following along...
You can learn more at [Create intelligent health bots with Azure Health Bot - Training | Microsoft Learn](https://learn.microsoft.com/training/paths/create-bots-azure-health-bot/?wt.mc_id=studentamb_71460)

Found this useful? Share it with others and follow me to get updates on:

- Twitter ([twitter.com/john00isaac](https://twitter.com/john00isaac))
- LinkedIn ([linkedin.com/in/john0isaac](https://linkedin.com/in/john0isaac))

> Feel free to share your comments and/or inquiries in the comment section below..
> See you in future demos!