Google’s Dialogflow is one of the most powerful tools available for building chatbots & AI-driven conversational agents. Whether you're looking to enhance customer support, drive sales, or automate workflows, Dialogflow makes chatbot development accessible and efficient.
It is easy to use, can handles the complex conversation, available in many languages, easy integration with other tools, easy webhook integration (HTTP request events on specific action inside Dialogflow system).
In this guide, we’ll walk you through the step-by-step process of creating a chatbot using Dialogflow, covering all essential concepts and best practices.
What is Dialogflow?
Dialogflow is a Natural Language Understanding (NLU) platform that helps developers create conversational interfaces for applications, websites, and messaging platforms like WhatsApp, Facebook Messenger, and Slack. It is powered by Google Cloud’s machine learning capabilities, allowing it to understand user intent and generate intelligent responses.

Step 1: Setting Up Dialogflow
1.1 Create a Google Cloud Project
To use Dialogflow, you must first create a Google Cloud Project:
Visit Google Cloud Console.
Click on Create Project and enter a name for your project.
Enable Dialogflow API in the Google Cloud Console.
Set up billing (Dialogflow has a free tier, but certain features require a billing account).
1.2 Access Dialogflow Console
Go to the Dialogflow Console.
Sign in with your Google account.
Click on Create Agent and provide the agent’s name, default language, and time zone.
Choose Google Cloud Project linked to your Dialogflow agent.
Step 2: Creating Your Chatbot’s Structure
2.1 Understanding Intents
In Dialogflow, Intents represent the purpose of a user’s input. Each intent maps user queries to appropriate responses.
Example: If a user asks, “What are your business hours?”, Dialogflow maps this to a predefined intent that provides the correct response.
2.2 Adding Intents
Go to the Intents tab in Dialogflow.
Click Create Intent and give it a name (e.g., 'greeting_intent').
Under Training Phrases, add user inputs like:
"Hello"
"Hey there"
"Good morning"
Under Responses, add chatbot replies:
"Hello! How can I assist you today?"
"Hi there! Need help with something?"
Click Save to train your chatbot.
Step 3: Enhancing Conversations with Entities
3.1 Understanding Entities
Entities help Dialogflow extract key information from user inputs. For example, if a user says “Book a flight from New York to Los Angeles”, New York and Los Angeles can be detected as location entities.
3.2 Creating Custom Entities
Navigate to Entities in Dialogflow.
Click Create Entity and provide a name (e.g., 'city_names').
Add synonyms for values:
New York → (NYC, New York City)
Los Angeles → (LA, L.A.)
Click Save and link the entity to relevant intents.
Step 4: Configuring Fulfillment for Dynamic Responses
4.1 Enabling Fulfillment
Fulfillment allows your chatbot to connect with databases, APIs, or other external systems to provide real-time responses.
In Dialogflow, navigate to Fulfillment.
Enable Webhook and provide a webhook URL.
Create a backend server (using Node.js, Python, or Firebase) to handle requests.
4.2 Writing Webhook Code (Example in Node.js)
const express = require("express");
const app = express();
app.use(express.json());
app.post("/webhook", (req, res) => {
const intentName = req.body.queryResult.intent.displayName;
let responseText = "";
if (intentName === "book_flight") {
responseText = "Sure! Where would you like to fly?";
}
res.json({ fulfillmentText: responseText });
});
app.listen(3000, () => console.log("Server is running"));
This webhook listens for book_flight intent and responds dynamically.
Step 5: Integrating Dialogflow Chatbot with Messaging Platforms
Once your chatbot is functional, you can integrate it with multiple platforms:
5.1 WhatsApp Business API Integration
To integrate your chatbot with WhatsApp, use a WhatsApp Business API provider like Heltar (or instead, opt for an easier version altogether i.e. our no code drag and drop chatbot builder)
Set up a WhatsApp Business API account.
Obtain API credentials from Heltar.
Connect Dialogflow to the WhatsApp API using webhooks.
Deploy and test your chatbot!
5.2 Facebook Messenger Integration
Go to Integrations in Dialogflow.
Enable Facebook Messenger.
Provide the Page Access Token from Facebook.
Set up webhooks for Messenger.
Deploy the chatbot and start engaging users.
Step 6: Testing and Deployment
6.1 Testing Your Chatbot
Dialogflow provides a built-in Testing Console where you can:
Simulate conversations.
Debug errors in responses.
Improve chatbot performance using Training History.
6.2 Deploying Your Chatbot
Optimize training data and responses.
Set up Dialogflow on Google Cloud Functions for scalability.
Monitor chatbot interactions using Google Analytics.
Continuously update intents based on user feedback.

Google DialogFlow - CX vs ES
Google Dialogflow recently introduced Dialogflow CX (Customer Experience) – a powerful tool for creating advanced virtual agents. The older version of Dialogflow has been renamed to Dialogflow ES (Essentials). Dialogflow is now a common term to describe both the Dialogflow ES and CX. In this article, we can see the enhancements and limitations of Dialogflow CX vs ES.
Dialogflow CX provides a new way of designing virtual agents, taking a state machine approach to agent design. This gives a clear and explicit control over a conversation, a better end-user experience, and a better development workflow.
Dialogflow CX | Dialogflow ES | |
---|---|---|
Agent types | Advanced, suitable for large or complex agents | Standard, suitable for small to medium agents |
Number of agents per project | Supports up to 100 agents | Supports one agent per project |
Conversation paths | Controlled by flows, pages, and state handlers | Controlled by intents and contexts |
Features | Streaming partial response, private network access, and continuous tests | Basic features like intents, entities, and contexts |
Additional information | Dialogflow CX is more user friendly and controlled by journeys or the flow via the page | Dialogflow ES has a free tier plan with limited quota and support. |
Google DialogFlow Pricing - CX vs ES
Feature | DialogFlow CX | DialogFlow ES |
---|---|---|
Text (includes all Detect Intent and Streaming Detect Intent requests that do not contain audio) | $0.007 per request | $0.002 per request |
Audio input (also known as speech recognition, speech-to-text, STT) | $0.001 per second | $0.0065 per 15 seconds of audio |
Audio output (also known as speech synthesis, text-to-speech, TTS) | $0.001 per second | Standard voices: $4 per 1 million characters WaveNet voices: $16 per 1 million characters |
Mega agent | NA | <=2k intents: $0.002 per request § >2k intents: $0.006 per request § |
Design-time write requests For example, calls to build or update an agent. | no charge | $0 per request |
Design-time read requests For example, calls to list or get agent resources. | no charge | $0 per request |
Other session requests For example, setting or getting session entities or updating/querying context. | no charge | $0 per request |
Conclusion
Creating a chatbot with Dialogflow is a straightforward process that involves defining intents, training responses, and integrating with external platforms. But Heltar also provides a no code drag-and-drop chatbot builder that can be used by literally anyone and everyone because of its intuitive UI. By leveraging Dialogflow’s AI capabilities, businesses can build chatbots that provide seamless, intelligent, and automated conversations for customer interactions.
Want to integrate a WhatsApp chatbot for your business? Heltar offers the best solutions to help you get started with WhatsApp Business API-powered automation. Contact us today!