I am no Google Cloud expert. And I am certainly not a “general cloud expert” who is able to compare multiple cloud services and provide recommendations. This post is based on the various scenarios where I have run into Google’s Cloud services in the process of building Dialogflow chatbots.
If you don’t need a webhook, you don’t need Google Cloud (or any other cloud)
First, if your chatbot doesn’t need webhooks at all, then you don’t need any cloud service. Can you build complex bots without webhooks? I think it is unlikely, but you might perhaps build an FAQ bot which is extensive, but doesn’t have any business logic and doesn’t need a webhook.
So the rest of the article will assume that you do need webhooks in your chatbots.
An alternative to Google Cloud
My introductory webhook tutorial is built on Heroku (another cloud provider). I also encourage people just getting started with Dialogflow webhooks to use that tutorial first, as you can learn the basic concepts very quickly (especially when you consider that for Google Cloud, you have a fairly steep initial learning curve).
There are also other cloud services that you can consider for deploying your webhook: AWS, Azure etc.
Now let us look at the reasons why you might still want to go with the Google Cloud.
Reasons to use the Google Cloud
In October 2017, Dialogflow added “inline webhooks”. This is a way to write simple webhook code right inside the Dialogflow console itself. Right now, it is challenging to write more complex business logic with inline webhooks because it is not really a full fledged IDE. You cannot even do very basic debugging in the Inline Webhook editor.
The big advantage of inline webhooks is: you can add simple business logic right into your chatbot itself. If you want to use inline webhooks, then you should learn about Google Cloud.
If you deploy your webhook to the Google Cloud, you can take advantage of the powerful Firebase authentication service. (Note: I haven’t used Firebase Authentication till now, but I have studied it and intend to use it soon).
Odds are, you will need some kind of user management if you are building a chatbot. And if you use Firebase authentication, you would have offloaded a major task to a more robust service when compared to rolling your own.
If you are using Dialogflow, you might also be quite interested in working with the Google Assistant. For this you need to use the Actions SDK. Right now (and I hope this changes), the documentation for the Actions SDK is so closely tied to the Google Cloud that it would probably be very challenging for you to skip the Google Cloud if you wish to develop apps with it. In fact, it seems even if you used the Google Cloud, the documentation is quite challenging – but that’s a topic for another time. 🙂
Note: I am not giving you reasons like Google Cloud is more scalable, is better documented etc. because I haven’t really tried the other cloud providers enough to give good answers for these kind of questions. This article assumes that all cloud providers are reasonable choices for hosting webhooks. Rather, I have tried to provide my view based on what someone building Dialogflow bots would like to do.
Finally, this is still one person’s opinion. There could be some very specific reasons why Azure (for e.g.) is the best choice for your bot. Please also do more research on your own as you make this decision.
Have a question?
Ask here. (Note: if the question is too broad for a single article or doesn’t fit the scope of this blog, I may not be able to answer it. In that case, I will let you know the reason via email).