I have written a lot about bulk uploading training phrases for Dialogflow. However, it has been only for text responses.
Recently, a client/customer was asking if it is possible to do the same for rich responses such as images, clickable links and such. My first answer was that probably not, since these rich responses are not something that can be easily specified inside a flat format such as a CSV file.
Top three Rich responses
However, I also noticed that the vast majority of use cases for rich responses are for the following types of rich responses:
Button (suggestion chips)
Cards (like the Info card in Dialogflow Messenger)
For example, here are some example Dialogflow Messenger bots. The only rich responses they use are buttons, clickable hyperlinks and cards.
With this additional restriction that you only support these three rich responses, there is a second option. You can actually use Markdown to specify the rich responses.
For clickable hyperlinks, you can use the regular Markdown links.
For cards, you can use Markdown links which enclose a Markdown image.
For the buttons, you can use something called Markdown attribute lists which extend regular Markdown so that you can define more elements using it. Then you can simply add a class such as .btn at the end of your regular Markdown hyperlink. Instead of turning it into a link, the Markdown to HTML converter will then convert it (render it) into a button.
Obviously, Markdown extension attributes are used for an entirely different purpose, but we can repurpose it for our current needs.
If you want to create a Dialogflow Messenger bot which is a bunch of links to top results for specific user questions, you can actually use this approach and create your chatbot in a small fraction of the time it would take you to type out everything by hand.
For example, you can create a bot like below (which simply answers questions based on articles on my website) in a few minutes.
I have now added support for bulk uploading training phrases to Dialogflow using BotFlo. For now, the Dialogflow Messenger FAQ Bot Generator feature it is still in Beta as I am trying to make sure it covers all the use cases.
You can try out BotFlo here.
You can learn about how to specify rich responses using Markdown (with some examples) here.
You can read the documentation on converting your CSV file into a Dialogflow Messenger FAQ bot here (And also leave me feedback if you are looking for specific features).
For now, I am only supporting bulk upload for Dialogflow Messenger. I am planning to extend it for the following channels:
Would you like to see support for something that I haven’t considered? Leave a comment below.
Check out my free Udemy course: Zoho Deluge Script Quickstart for Programmers
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