LeeBoonstra.dev
Build a Conditional Template in Dialogflow for Google Assistant With Custom Payloads

Blog: Learn Machine Learning from a Google AI Engineer

Build a Conditional Template in Dialogflow for Google Assistant With Custom Payloads

What I like most about Dialogflow, (the tool to create Chatbots and Smart Assistants / Google Assistant apps), is that you can maintain your conversations within the Dialogflow UI. Many users write their complete FAQ content in intents and responses. You no longer need a developer to tweak your conversations or deploy your agent which makes it very scalable for large organizations. It’s also possible to load data from external systems. In that case, you are hosting parts of the conversation elsewhere. You could store these parts in language files or databases. Some organizations prefer to write the full conversation in the Dialogflow UI. That way your copywriters can maintain the full conversation.

It’s good to know that it is possible to use templates and conditionals within the Dialogflow UI. The trick here, is to make use of the custom payload response setting, which you can find in the Intent > Responses section.

Actions on Google With Google Cloud Functions

When building Google Assistant apps (actions) with Dialogflow, you likely will have to write some...
Disclaimer: The opinions stated here are my own, not those of my company. - 2025 ® Lee Boonstra