As of this writing, there is no simple way to see the conversation history of your Dialogflow CX bot. Unfortunately this means you don’t have a good idea of how people are interacting with your bot.
In this tutorial, I explain how you can use existing Google software to download the history of your Dialogflow CX bot.
Enable StackDriver logging
First, in the settings of your bot, click on the “Enable StackDriver Logging” in your Dialogflow CX bot’s agent settings.
Note: the logs are only collected AFTER you check this box. That is why, in my Dialogflow Tips, I tell people that this is the first thing they should do.
Filter for Dialogflow logs
Once the user has interacted with your CX bot, click on the link next to the “Enable StackDriver logging” checkbox. This will take you to StackDriver logs explorer.
Note: You can also export StackDriver logs to BigQuery, but it is not very friendly for technical non-programmers when compared to the approach I am describing here.
In the Logs Explorer, use the Log name Filter button on the top. You see that Dialogflow is one of the filter options.
Check the Dialogflow option (which will automatically check the “requests” checkbox).
Choose a time range
When you first choose the filter and click on the Add button, you will probably see that the logs are empty unless your bot already has a lot of user interaction.
Now choose an appropriate time range (the link is on the top right of the page, below the search bar) such as 7 days and click on Apply button.
Now you will see more logs appear below.
Download the logs
Click on Actions button above the logs and choose “Download logs”
Now choose the maximum number of log entries to download. And then choose either CSV or JSON as the download format. Then click the Download button.
The CSV format has a lot of columns, and looks like below.
A few things to note about the CSV format
- there are a lot of columns, and the number of columns is proportional to the depth of the object hierarchy of the log format (which is chosen by Dialogflow and isn’t something you can configure)
- the request and response logs appear on alternate rows
- the response JSON just has [Object object] and doesn’t have the full details
The JSON format has more details and is better structured (because the “queryResult” field includes the input query).
If you download the logs in JSON format, you can use the BotFlo app to convert the StackDriver JSON logs it into a CSV format which will make it easy for you to analyze your bot’s conversation history and calculate the accuracy of your bot. Unlike the CSV file you get from directly exporting from StackDriver, the BotFlo app also provides the full Response message (which is in JSON format) in the CSV file.
<— End of article —>
This website contains affiliate links. See the disclosure page for more details.
"The magic key I needed as a non-programmer" The custom payload generator was the magic key I needed (as a non-programmer) to build a good demo with rich responses in DialogFlow Messenger. I've only used it for 30 minutes and am thrilled. I've spent hours trying to figure out some of the intricacies of DialogFlow on my own. Over and over, I kept coming back to Aravind's tutorials available on-line. I trust the other functionalities I learn to use in the app will save me additional time and heartburn. - Kathleen R Cofounder, gathrHealth
"Much clearer than the official documentation to be honest" Thanks a lot for the advice (of buying and following your videos)! They helped a lot indeed. Everything is very clear when you explain, much clearer than the official documentation to be honest 🙂 Neuraz T Review for Learn Dialogflow CX
"I will strongly recommend this course because even I can learn how to design chatbot (no programming background)" I think Aravind really did a great job to introduce dialogflow to people like me, without programming background. He organizes his course in very clear manner since I have been a college professor for 20 years. It is very easy for me to recognize how great Aravind’s course is! Very use-friend and very easy to follow. He doesn’t have any strong accent when he gives the lectures. It is so easy for me to understand. Really appreciate it. Yes, I will strongly recommend this course because even I can learn how to design chatbot (no programming background) after studying Avarind’s course, you definitely can! Ann Cai Review for Learn Dialogflow ES