DialogFlow | Tools

How to bulk upload training phrases for Dialogflow Messenger

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) Clickable hyperlinks Cards (like the Info card in Dialogflow Messenger) For example, here are some example Dialogflow Messenger bots. The…

DialogFlow | Website Bots

How to send rich responses from webhook to Dialogflow Messenger

Recently, I got this question on YouTube: i have added rich responses code in my dialogflow fulfillment. but when i am testing with dialogflow messanger integration, it is not diaplaying any images, cards on dialogflow messanger. Can you tell me what version i need to use? Based on the question, I suppose this person is using the Dialogflow fulfillment library. I recommend people avoid using the fulfillment libraries for Dialogflow unless they are building a voice bot. Since this question is about Dialogflow Messenger, it is recommended that you don’t use the fulfillment library. There are three reasons why I recommend you avoid the fulfillment library: a) it makes things unnecessarily opaque b) the fulfillment library is rarely up to…

Analytics | DialogFlow

Dialogflow Conversation Analytics Tips

The ability to do conversation analytics in Dialogflow is directly tied to the accuracy of your bot’s intent mapping. (Here is an article which talks about measuring your Dialogflow bot’s accuracy) This is why Chatbase is not a particularly useful tool for Dialogflow conversation analytics. Unlike Google Analytics funnels, where you can be certain that a user click is exactly what shows up in the “funnel”, the same thing cannot be said about Chatbase funnels (read my article on Chatbase funnels if you haven’t used them before) which actually rely on Dialogflow’s intent mapping being accurate. Even in their documentation, Chatbase recommends that you manually inspect the transcript to ensure that the correct intent was mapped. They recommend that you…

DialogFlow | REST API

A simple method to evaluate multiple bot frameworks

Note: this guide is meant for programmers who are familiar with APIs Recently I was talking to someone who has built a cross-bot-framework conversation designer – like an abstraction layer which sits on top of all the major bot frameworks and provides drag-and-drop interfaces to design your bot. It is an interesting idea, but there is a major problem – all the bot frameworks are not the same. Dialogflow ES, Dialogflow CX, Watson Assistant, Amazon Lex, Microsoft LUIS, RASA NLU – all of them are very different from each other. In fact, they are so different from each other that any effort to unify them to build a higher level abstraction layer will suffer from a problem – you either…

DialogFlow

How to bulk upload intents from a CSV file in Dialogflow

If you are creating a large FAQ chatbot in Dialogflow, typing out all the intents one by one can be a slooooooooow and painful process. Thankfully, Dialogflow has an agent ZIP file import feature, and it is possible to programmatically create this ZIP file. In this article, I describe how you can type out your intent information into a spreadsheet and then use a CSV export of your spreadsheet to generate a Dialogflow agent ZIP file. I also discuss the different aspects you need to consider as you try to use this approach for more complex FAQ bots. By following this template, you should be able to build a tool which can create a Dialogflow FAQ chatbot with the push…

Conversation Design | DialogFlow

3 ways to pass parameters between intents in Dialogflow ES

One of the big advantages of Dialogflow is that you can build contextual chatbots using it. What are contextual chatbots? My simple definition would be: The chatbot should keep track of what the user said before, and the conversation should flow accordingly. By the way, this is surprisingly hard to do. So much so that the Dialogflow team has created an entirely new version of Dialogflow called Dialogflow CX which has a pretty sharp learning curve. As you build contextual chatbots, you would have to keep track of parameters (user inputs such as their name, location etc) so that you can pass them between your intents. There are three primary ways to pass parameters between intents. 1 Use followup intents…

Debugging | DialogFlow | Tools

Do this when Dialogflow ES matches the wrong intent

Is your Dialogflow bot triggering the wrong intent? I see questions such as these on forums sometimes: In this article, I explain a few things you can do when you need some help figuring out why your Dialogflow agent is behaving like that. This article only applies to Dialogflow ES bot and not for CX bots. Understand Candidate Intents The concept of candidate intents is a very powerful one in Dialogflow ES bots. What is a candidate intent? It is easier to understand candidate intents by understanding non-candidate intents. If an intent cannot match at a given step in the conversation because it has an input context which is not active at that point, it cannot be a candidate. Every…

DialogFlow | REST API

Understanding Dialogflow service account roles and their use cases

As you try and use Dialogflow’s REST API, one of the things you will notice is that the documentation talks about “service accounts”. In this article, we will see what these service accounts are and how they are typically used. Instead of going over any big theory (which is also important to fully master the REST API), I will just explain the basic use cases so you have a simpler starting point to understand how they work. What are Dialogflow service accounts? Simply put, a service account provides a way to call Google APIs from your code. Here is the official definition. So we can use these service accounts to access your Dialogflow agent from your code. How to create…

Courses | DialogFlow

Course Discounts

I am planning to have substantial discounts on my courses and other products for Thanksgiving 2020. If you are interested in getting email notifications, please sign up to my MBD Deals on Gumroad. You will only get the discount email if you sign up Also, the only folks who will get discount emails are those who sign up for it. I am not going to be announcing these discounts anywhere else. Also, each discount email will only be sent out once, and you will usually have 24-36 hours before the discount expires. So I should pay some money now, so I can pay MORE money later? I know that’s what you are probably thinking, but hear me out. 🙂 There…

DialogFlow | Python | Webhooks

How to debug Dialogflow Python webhook using ngrok

In this tutorial I will explain how you can debug your Python Flask webhook for your Dialogflow bot using ngrok. I use the PyCharm professional IDE (you can also download the free PyCharm community edition) in this tutorial. 1 Create a new Pure Python project You can just start with a regular old Python project. No need to do anything more fancy. 2 Install flask inside the virtual environment Open the Terminal inside your PyCharm IDE. Use pip install Flask to install the Flask web framework inside your virtual environment. 3 Add a new Python file and call it app.py Create a new Python file called app.py. Your project structure should look like below. Add the following code into your…

DialogFlow | Mobile App

How to integrate Dialogflow into your Flutter app

This is not a tutorial. But I want to provide some pointers because it seems people are not clear on an important aspect of Dialogflow integrations. I got this question on YouTube: The 4 Layers of a Dialogflow bot I have explained the concept of the 4 layers in a Dialogflow bot before. In the case of a Dialogflow + Flutter (mobile app) integration, you are responsible for both the middleware layer AND the UI layer. This is what makes it so complex (or at least so much more work). How to create the integration So here is what you need to do to integrate Dialogflow into your Flutter app: 1 Create the middleware code The middleware code is responsible…

DialogFlow | REST API

Get your DialogFlow agent to initiate the conversation before user types a message

First published: Aug 2017 | Last Updated: Oct 2020 So let us understand the question: When you work with Dialogflow you notice that it follows the “user types something -> agent replies with an answer” sequence. Suppose you wish to get the agent to say something before the user types anything, how do you do it? Example In my CourseBot (seen above), I initiate the conversation by using the same ideas described on this page. Dialogflow Built In Welcome Events When you click inside the Event textbox in Dialogflow, you will notice in the autocomplete a bunch of CHANNEL_WELCOME events. What are these welcome events? In principle, this is the feature you should use to initiate conversations on different channels….