So you tried out the tutorial in its entirety. But you are not getting the expected response. Here is a troubleshooting sequence. Use the Show JSON button to see the webhook status When you don’t see the response you are expecting, click on the Show JSON button and note down what you see in the webhook status. Note: In your webhook status, you might see a couple of things. You might see a message which indicates there was a timeout, or perhaps an Error 500 which is an internal server error. Checking the Firebase logs You have noted down the webhook status and the corresponding error. Which type of error is it? Internal Server Error If you see a 500 […]
Prerequisite: You have added an intent into your Dialogflow agent with the action ‘firebase.update’ Once you create a suitable intent, you are ready to trigger the intent and cause the intent to call the webhook, which is turn will write the data to the Cloud Firestore.
Prerequisite: You have successfully deployed the cloud function and added the function URL into your fulfillment URL in the Dialogflow console You have seen that the cloud function has been deployed successfully.
Prerequisite: You have updated index.js to include the cloud function which Dialogflow will use Once you have modified index.js, you will be deploying it to Cloud Functions.
Prerequisite: You must have successfully initialized the Firebase SDK for Cloud Functions In this step, we will be modifying the index.js that you already have inside your functions folder. If you are completely unfamiliar with Cloud Functions, you should spend at least a little time familiarizing yourself on what they are and how they work. I suggest the following playlist on YouTube, and focus only on the videos which talk about NodeJS. You can follow along the tutorial without watching the playlist, but you will not understand a few things about what we are doing. It is definitely preferable to follow the tutorial after learning more about cloud functions than blindly copy/pasting the code because taking that little time to […]
Prerequisite: You have enabled Cloud Firestore for your project In this step we will initialize the Firebase SDK for Cloud functions. As it happens, there is a Firehose 😉 of concepts you need to understand if you want to master Firebase. I will give you some tips on further reading, but you don’t need to understand everything just to get this tutorial working. And please remember that I am not an “expert” in Firebase, although I have learnt enough to explain much of what is going on. When I want to point out some extra reading material, I will indicate that inside square brackets and you can see the actual resources at the end of the page First, create a […]
Prerequisite: You have already created a Dialogflow project and noted the project ID. Now you will need to enable Cloud Firestore for your project. What is the Cloud Firestore? Firebase already has a real time database. So what is Cloud Firestore? At first glance, the definition does look like buzzword bingo. 🙂 However, note the stuff highlighted in red. Cloud Firestore is like the real time database already in Firebase, but it also offers seamless integration with other Google Cloud Platform products, including Cloud Functions. You might remember from the previous part that the Inline Webhook Editor uses cloud functions. Using the Cloud Firestore, it will be easier to integrate it with our code. Firebase console While logged in to […]
We first need to create a Dialogflow agent. You should be able to do it in a single click, but the important thing for this step is that once you have created the agent, you will have a project id. This project ID will be used for your other work when using Firebase, so make a note of the projectID.
On a recent coaching call, a student was frustrated. There are no tutorials or resources if someone wants to use Firebase to save data in a Dialogflow chatbot which isn’t built for Actions on Google I searched around a bit, and generally found this statement to be true. So I spent some time implementing a simple demo which uses Firebase to save the data and is independent of the Actions SDK. Here are a few things you might want to know as we get started. What is Firebase? Wikipedia describes Firebase as a “Mobile and web application platform”, but for our purposes, it is a database to save your chatbot data. Unlike regular databases such as MySQL, Firebase is a […]