Home / DialogFlow ES / Why I avoid the Dialogflow fulfillment library
DialogFlow ES | Webhooks

Why I avoid the Dialogflow fulfillment library

In my webhook tutorials, I usually directly construct the JSON and send it back to Dialogflow. Obviously, this has the major benefit of explaining what happens under the hood, as someone pointed out on my YouTube channel:

THANKS THANKS THANKS! For days i have been trying to find a video where people show how to use an external webhook, but from approx. 40 videos i watched, NONE used your solution. They all stick to the Firebase solution. Thanks for your way!

In addition, it is somewhat programming language agnostic and so the tutorial is more useful (if you can understand how the code is constructing the JSON).

But that’s not the only thing.

I usually avoid the Dialogflow fulfillment library entirely.

There are a few reasons for this.

Note: please do not confuse the Dialogflow fulfillment library with the AoG client library (although the code looks very similar). At the moment, the AoG client library is the simplest way to construct JSON responses for Google Assistant apps.

You will find a lot of issues raised on GitHub about how the fulfillment library isn’t up to date with the latest updates in some channel or the other.

It is not up to date

Also, for some context, the authors have already mentioned that the library isn’t maintained and should only be used within the inline editor.

However, they should have gone a step further and also asked people to stop using the inline editor because it is not a very useful tool for serious development work. Otherwise people who do use the inline editor end up going around asking questions like these:

Don’t confuse the NodeJS client library with the Dialogflow fulfillment library
The answer on SO explains the difference

The abstraction is not very helpful

All this might be OK if the abstraction provided by the fulfillment library is extremely good. That isn’t the case at all.

Often, you will have a much clearer understanding of what is going on by inspecting the raw JSON.

I am not sure why this is the case, but I suppose it is because the message object format is too flexible, meaning there are very few rules on what can be combined and what cannot be combined inside the message response JSON.

In any case, handling the pure JSON is often much easier.


If you are building a Dialogflow Messenger bot, I have built a tool which provides a visual editor for the custom payloads. Once you generate the payload JSON as per your requirements, you can just substitute the appropriate variables inside your webhook code.

<— End of article —>

This website contains affiliate links. See the disclosure page for more details. 
"The magic key I needed as a non-programmer"

The custom payload generator was the magic key I needed (as a non-programmer) to build a good demo with rich responses in DialogFlow Messenger. I've only used it for 30 minutes and am thrilled. I've spent hours trying to figure out some of the intricacies of DialogFlow on my own. Over and over, I kept coming back to Aravind's tutorials available on-line. I trust the other functionalities I learn to use in the app will save me additional time and heartburn.

- Kathleen R
Cofounder, gathrHealth
"Much clearer than the official documentation to be honest"

Thanks a lot for the advice (of buying and following your videos)! They helped a lot indeed. Everything is very clear when you explain, much clearer than the official documentation to be honest 🙂

Neuraz T
Review for Learn Dialogflow CX
"I will strongly recommend this course because even I can learn how to design chatbot (no programming background)"

I think Aravind really did a great job to introduce dialogflow to people like me, without programming background. He organizes his course in very clear manner since I have been a college professor for 20 years. It is very easy for me to recognize how great Aravind’s course is! Very use-friend and very easy to follow. He doesn’t have any strong accent when he gives the lectures. It is so easy for me to understand. Really appreciate it.

Yes, I will strongly recommend this course because even I can learn how to design chatbot (no programming background) after studying Avarind’s course, you definitely can!

Ann Cai
Review for Learn Dialogflow ES

Similar Posts