Courses | DialogFlow

Thanksgiving 2020 Deals

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 Create a new Python file called 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…


How to bulk upload intents from a CSV file in Dialogflow

First published: Jan 2018 | Last update: Oct 2020 I was recently asked by a client if it is possible to bulk upload intents from a CSV file to Dialogflow. Apparently, there was a time when this feature was already available in Dialogflow. But it isn’t straight forward anymore, and its probably for a good reason. CSV file structure Typically, the CSV file structure is simple. There is a column with a user says message, and then another column with the text response. What you want to do: You upload this CSV format, and you have an agent at the end of it. Things to consider Now, this simple format is not sufficient. For example, how can you handle multiple…

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….


Dialogflow Quickstart Templates

Quickstart templates are small (micro) bots which are designed for a very specific task. There are three parts (files) in these templates usually – a video demonstrating what the bot does, a video demonstrating how to build the bot, as well as the agent ZIP file for the bot. This way, you can download the agent ZIP file and import it into your Dialogflow console and follow along with the video which shows how to build such a bot. There are multiple benefits of using these Dialogflow Quickstart Templates to learn how to build Dialogflow bots they are small and self-contained, so easier to follow what is going on they do not contradict each other. Since all these bots are…

DialogFlow | Website Bots | Zobot

Dialogflow Zobot: Selection Triggers the next intent

In this tutorial, I will explain how you can move to the next intent based on a button selection in a Dialogflow Zobot. [1] What we are building We will be creating a bot which provides coupons for courses on my course website (to begin with. More features will be added later). Flowchart Let us take a look at the flowchart for this chatbot. Please take some time to go through my article on Dialogflow flowcharts to get a background on the conventions I have used in this flowchart. In addition to my usual conventions, I use two more conventions in this flowchart: a) The triple slash (///) acts as a separator and indicates a new chat bubble will be…

DialogFlow | Integrations

Dialogflow Architecture

First published: April 2018  |  Last Updated: July 2020 Recently, I realized that people are not always very clear about Dialogflow’s architecture. In particular, a client was mixing up fulfillment and integrations. So this article provides a high level overview of Dialogflow’s architecture with a focus on how data flows when users interact with Dialogflow agents. In my view, there are 4 concepts you need to understand to get a good picture of Dialogflow’s architecture. 1 Request-response You can summarize a Dialogflow agent as a series of (request, response) pairs [1] . That is, 1 User sends a request to the Dialogflow agent 2 (some NLU magic happens) 3 Dialogflow sends a response back to the user Why is this…

DialogFlow | Python | Webhooks

Dialogflow Python webhook tutorial

One of the things that I have mentioned before is that you need to have a programmer on your team if you would like to build a non-trivial Dialogflow bot. At the same time, all Dialogflow bot makers would still benefit from understanding the basics of webhooks. This tutorial will be helpful if you are technical, but not a programmer. I will explain just enough about Dialogflow webhooks to make you dangerous. 🙂 If you are a programmer, this guide will still be helpful if you are new to Dialogflow. Hello World Let us start with a simple Hello World program. First, sign up for a free account at You can use your Google account to sign in. Create…

DialogFlow | Website Bots

Convert your WordPress website into a Dialogflow FAQ chatbot

I have created a tool which allows you to turn your WordPress website into a Dialogflow FAQ chatbot for your website within a few minutes. It is based on the Dialogflow Messenger integration. You can interact with the live bot (created by using this tool) here. For now, the tool is free. At some point in the future, I will probably make this a paid tool. So if you are interested, you should check it out soon. Learn more

Conversation Design | DialogFlow

When NOT to use follow up intents in DialogFlow

There are some situations where you shouldn’t use followup intents, because it will not work. The while loop There was a chatbot called the Florist bot that was originally used as an example bot in the Dialogflow documentation (when it was still called API.AI). This is what the flowchart of the Florist bot looked like. In the figure below, the area marked in red is actually a while loop. In theory, the user can just keep indefinitely adding red roses into the bouquet and never say “No, thanks” and exit the loop. This is the “while loop” in software terminology. It is not possible to use followup intents for this conversation flow, since you wouldn’t know how many levels deep…