skip to Main Content

I build a chatbot with MS Bot Framework composer and published it on Azure. I embedded the bot in a webpage. When I tested the bot with the emulator, I could see a log of all the messages that were sent back and forth between the user and the bot. I need a log file of all the messages while the bot is hosted on Azure.

I also activated Azure Insights. But I couldn’t find a tool to extract all the messages from the conversations with the bot.

2

Answers


  1. One possible solution to extract all messages from the conversations with your bot hosted on Azure, you can use write directly to storage method.

    First, you’ll need to set up either an Azure Blob Storage account or an Azure Cosmos DB account and configure your bot to use it as the storage.

    For Azure Blob Storage, follow these steps:

    1. Create a Blob Storage account and a container in the Azure portal.
    2. Add the Blob Storage configuration information (connection string and container name) to your bot’s configuration file.
    3. Install the necessary packages (Microsoft.Bot.Builder.Azure.Blobs) and modify your bot’s code to use Azure Blob Storage instead of Memory Storage.

    For Azure Cosmos DB, follow these steps:

    1. Create a Cosmos DB account and a database in the Azure portal.
    2. Add the Cosmos DB configuration information (endpoint, auth key, database ID, and container ID) to your bot’s configuration file.
    3. Install the necessary packages (Microsoft.Bot.Builder.Azure) and modify your bot’s code to use Azure Cosmos DB instead of Memory Storage.

    For detailed examples, you can check this documentation

    Login or Signup to reply.
  2. Since you’re using Composer, the easy built in way is to just setup blob storage and configure transcript logging in the bots settings:

    {
      "runtimeSettings": {
        "features": {
          "blobTranscript": {
            "connectionString": "<CONNECTIONSTRING>",
            "containerName": "<CONTAINERNAME>"
          }
        }
      }
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search