While it’s great that you can create an awesome conversational experience with DialogFlow, there are some limitations. It’s not native and your users will notice. Luckily, Google provides solutions to solve this problem. In this section we will cover integrations with Facebook Messenger and Firebase, using DialogFlow for back-end processing. Facebook has had a chatbot platform for some time, but their messaging experience is not as good as it could be. In order to provide a better experience for users and improve engagement, they released an SDK for their Messenger platform. Firebase is a free platform provided by Google for creating real-time apps. It’s simple to use and provides a ton of features, making it the perfect choice to create a conversational UI.

In order to integrate with Facebook Messenger and Firebase, we need some heavyweights: Node.js, Express and GraphQL. With these in place, we will be able to add DialogFlow directly as an API on our Firebase project! Yup, you read that right: your web app will have a GraphQL API, which can be queried with any HTTP client. With the Facebook Messenger SDK, you can access this GraphQL API and receive real-time messages from users! This is a hands-on tutorial that takes you through the process of setting up both Facebook Messenger and Firebase. Once complete, I’ll walk you through the code needed to add DialogFlow to your Firebase project. The end result is an awesome conversational UI that integrates directly with your Firebase project!

How To Take Your Chatbot To The Next Level… By Learning Google Cloud Functions!

We’ve made it this far together — but now it’s time for me to go my own way. However, before we part ways I want to leave you with one final tip: Google Cloud Functions. This isn’t a platform like the others we covered, but rather an extremely powerful tool in your arsenal that allows you to take things even further! You see, Cloud Functions is exactly what it sounds like: functions hosted in the cloud (aka Google). This means they are always running and available for use whenever they are needed. It also means they are asynchronous — meaning they don’t block each other or other resources on your server. So how does this help? Well… Let me show you what I mean by using our chatbot example as a guide! Chatbots are usually made up of multiple components, which need to work together in order for the chatbot to process a request. For example, a user might ask “What is my balance?” Which involves performing a search on your database and returning some results. You will then use DialogFlow to decide if this was an intent you can handle, and if so you will return a response with the results from your database. The problem with this type of scenario is that both the DialogFlow Intent Request (which happens in real-time) and the request to your database (which can be slow) need to run sequentially. Meaning they cannot run at the same time because they both require access to other resources, such as your database or host server.

This makes it difficult to maintain high performance while handling requests in real-time. The solution? Google Cloud Functions! With Cloud Functions we don’t have this limitation because they are asynchronous — meaning they don’t block each other when running on different resources. This means that your chatbot can respond instantly without having to wait for data from another system! Not only that, but it also allows you to break larger tasks into smaller chunks by creating functions specific for specific purposes — like performing searches on our database or fetching information about an item from an API endpoint… And more! This is how we will take our chatbot to the next level! By leveraging Google Cloud Functions in order to break up our code into smaller, more manageable pieces. The end result will be a chatbot that’s faster and more reliable than ever before! I hope you’ve enjoyed learning about the different platforms and tools available for creating chatbots — and I hope you take what you’ve learned to the next level by exploring each of them further.


Marco Lopes

Excessive Crafter of Things

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *