DialogFlow | Integrations

Dialogflow Architecture

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 important? You see a lot of questions on forums…

DialogFlow | Integrations

How to integrate Telegram with Dialogflow

In this tutorial, I explain how to integrate your Dialogflow bot with the Telegram chat app. Why I prefer Telegram when creating tutorials I usually prefer to use Telegram for creating tutorials and demos. There are a few reasons for this: The process of creating the bot inside Telegram is quick since you can do it by sending messages to a designated “BotFather” account Telegram has only a single access token, so the integration steps are fewer Telegram supports a few rich responses such as buttons Hyperlinks in the text response of Dialogflow are automatically converted to clickable links inside the Telegram chat window Telegram supports multiple responses per message (for example, the 1-click web demo doesn’t support this) How…

DialogFlow | Integrations

Reader Question: Can I use a single agent for Facebook, WhatsApp and website bot?

I recently got this question from a reader. We need help in creating a chatbot for one of our clients. ….. The main problem we have is the language that we need to use: (mentions a language not supported by Dialogflow). The second is that we would like it to work the same on: Facebook, WhatsApp and website. I wouldn’t recommend this. Rich controls The main reason for this is that you are not utilizing all the benefits you get from the UI across all the three channels. Specifically, you have rich controls in these channels which can improve your conversation flow in a few different ways. Speed up user input For example, you cannot have buttons inside your WhatsApp…

DialogFlow | Drift | Integrations

Reader Question: Should I use Drift or Dialogflow?

I got another question on my Drift bot recently: should i use drift or dialogflow? which is best? As it turns out, this is a false dichotomy. Not only can you have both, it might even be a good idea to do so. And in addition, I have created a proof of concept of this on my website. The Drift chatbot already has a Dialogflow agent powering it. Unfortunately, it is still very much a simple agent because I haven’t had the bandwidth to create a more complex one yet. Drift has its own chatbots … Now, you may or may not know this – but Drift has its own chatbots. Except, they are not really “intelligent” in the sense…

DialogFlow | Drift | Integrations

I have created a proof-of-concept demo bot which integrates Drift live chat and Dialogflow

On the bottom right of all the pages on my site, you will see an orange box with a chat icon. If you click on the orange square, it will pop open a window, and you need to enter an email address (it is how Drift works, I don’t think it is possible to go to the next step without providing an email address). Once you do that, you will start interacting with my Dialogflow agent. If you are interested in creating a similar chat integration for your site, you can click here. Is the bot intelligent? The bot is still evolving, but as I write this for now it only allows for scripted (button-click) replies. I will be adding…

DialogFlow | Integrations | Rich Responses

How to send any Facebook Messenger rich response from Dialogflow webhook

I chose the title “How to send any Facebook rich response from Dialogflow webhook”. But it could just as well have been “How to send any Facebook Messenger | Telegram | Slack | Skype | Google Assistant | Google Telephony | Viber | Kik rich response” from a Dialogflow webhook, because there is no difference in terms of the channel. The technique I am going to show here is dead simple. Unfortunately, it has one big con, which I will cover at the end of this article. Get the actual JSON from the Dialogflow simulator Watch this video first  Create a response in Dialogflow corresponding to your specific rich response For example, here is a Facebook card intent. Trigger…

DialogFlow | Drift | Integrations

Reader Question: Why are you using Drift compared to Dialogflow?

I have installed the Drift live chat widget on my course website. Note: Right now, I have not connected it to any Dialogflow agent. It is purely a website chat widget, and will mostly display my status as offline. Eventually, I plan to incorporate a Dialogflow agent into it. The main purpose of the chat widget is to answer questions from people who are interested in my courses. (The chat widget will ask for an email address, so obviously I can only provide an answer if you actually provide an email address). So someone saw that I was using the Drift live chat widget, and asked the question. Suppose you are considering adding a website chatbot. I can give you…

DialogFlow | Integrations

Why a custom integration is (almost) always better than a 1-click Dialogflow integration

I got this question in my comments recently: This question got me thinking about building custom integrations versus using the built-in 1-click integrations in Dialogflow. I do understand that a lot of people choose Dialogflow mainly for its ability to do 1-click integration with multiple platforms. But my experience till date has been that almost always, you are better off building out a custom integration with Dialogflow. First, some definitions. What is a 1-click integration? These are the integrations you see on your Dialogflow console. Here is an example of a 1-click integration I built. (Sorry, I don’t have bandwidth to maintain it right now). What is a custom integration? When you build a custom integration, you will use Dialogflow’s…

DialogFlow | Integrations

Why I don’t write about the Facebook Messenger + Dialogflow integration

Over the last few days, I received two separate user questions asking me why I don’t cover the Dialogflow + Facebook Messenger integration on my site. I wrote some thoughts previously about this, and here I will provide an update post-GDPR. This is obviously my opinion, so if you don’t like the conclusion I suggest you continue doing whatever you were planning to do and just imagine you never read this article. 🙂 Reasons why you think it is a good idea to build Messenger bots Clearly, there are some major factors why people choose to build FB Messenger Bots. Here are some of them: the audience is huge the reach is massive “everyone is on Facebook” Let us look…

DialogFlow | Facebook Messenger | Integrations

When to use the relay mechanism for Dialogflow + Chatfuel integration

This is a response to this article on Medium which introduces a tool called Integrator which can be used to connect Dialogflow and Chatfuel. The article makes an important point about how the integration is quite challenging (which is true), so I am using this article to clarify when you might choose my system vs the tool they have proposed. The Medium article is also correct when it states that using my system will require you to be more hands on in terms of writing code. But I don’t think that is a major issue, given I don’t think it is possible to create sophisticated Dialogflow chatbots without writing some code anyway. When to use my relay system Use my…

DialogFlow | Facebook Messenger | Integrations

Chatfuel vs Dialogflow (API.AI)

I have seen this question on forums, and it also comes in the following versions: ManyChat vs Dialogflow FlowXO vs Dialogflow GoBot vs Dialogflow Turns out, the answers to these questions have an important thing in common: Conditional Logic Bot Services vs NLP based Bot Building Frameworks In other words, they are not in competition. If anything, they should be cooperating! Conditional Logic Bots A conditional logic bot is one where you basically map out a scripted conversation. Chatfuel is a good example of a service which lets you create conditional logic bots. The end user “talking” to the bot is usually implemented by clicking on a button, or selecting something from a list. The words “typed” by the user…

DialogFlow | Integrations | Rich Responses

Reader Question: How to get the message object format for the browse carousel rich response type?

The question is pretty straight forward. Browsing carousel The browsing carousel is a new rich response type which was recently added to the list of possible Google Assistant response types. The documentation hasn’t provided an example of the message object format (yet). Steps to find the message object format These steps can be used to find the message object format of any rich response type, not just the Google Assistant ones. 1 Create a dummy intent in your bot Create a dummy intent in your chatbot which can be triggered by a specific phrase (preferably inside a test chatbot) 2 Add the rich control as one of the responses In this case, you will add the Browse Carousel card as…