# How to create a chatbot on Google Dialogflow in 2025?
Author: Manav Mahajan
Author URL: https://www.heltar.com/blogs/author/manav-mahajan
Published: 2025-02-20
Tags: WhatsApp Chatbot, Business Chatbot, Dialogflow
Tag URLs: WhatsApp Chatbot (https://www.heltar.com/blogs/tag/whatsapp-chatbot), Business Chatbot (https://www.heltar.com/blogs/tag/business-chatbot), Dialogflow (https://www.heltar.com/blogs/tag/dialogflow)
URL: https://www.heltar.com/blogs/how-to-create-a-chatbot-on-google-dialogflow-in-2025-cm7dsv9940003ip0lk9d8mxh5

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.

![File:Dialogflow logo.svg - Wikipedia](https://prod.superblogcdn.com/site_cuid_clnw4nrag2342701vpmufcj1n2w/images/image-cp-1740084095542-compressed.png)

## **Step 1: Setting Up Dialogflow**

### **1.1 Create a Google Cloud Project**

To use Dialogflow, you must first create a **Google Cloud Project**:

1. Visit Google Cloud Console.

2. Click on **Create Project** and enter a name for your project.

3. Enable **Dialogflow API** in the Google Cloud Console.

4. Set up billing (Dialogflow has a free tier, but certain features require a billing account).


### **1.2 Access Dialogflow Console**

1. Go to the Dialogflow Console.

2. Sign in with your Google account.

3. Click on **Create Agent** and provide the agent’s name, default language, and time zone.

4. 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**

1. Go to the **Intents** tab in Dialogflow.

2. Click **Create Intent** and give it a name (e.g., 'greeting\_intent').

3. Under **Training Phrases**, add user inputs like:

   - "Hello"

   - "Hey there"

   - "Good morning"
4. Under **Responses**, add chatbot replies:

   - "Hello! How can I assist you today?"

   - "Hi there! Need help with something?"
5. 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**

1. Navigate to **Entities** in Dialogflow.

2. Click **Create Entity** and provide a name (e.g., 'city\_names').

3. Add synonyms for values:

   - New York → (NYC, New York City)

   - Los Angeles → (LA, L.A.)
4. 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.

1. In Dialogflow, navigate to **Fulfillment**.

2. Enable **Webhook** and provide a webhook URL.

3. 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](https://www.heltar.com/automation.html) chatbot builder)

1. Set up a WhatsApp Business API account.

2. Obtain API credentials from Heltar.

3. Connect Dialogflow to the WhatsApp API using webhooks.

4. Deploy and test your chatbot!


### **5.2 Facebook Messenger Integration**

1. Go to **Integrations** in Dialogflow.

2. Enable **Facebook Messenger**.

3. Provide the **Page Access Token** from Facebook.

4. Set up **webhooks** for Messenger.

5. 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**

1. Optimize training data and responses.

2. Set up Dialogflow on **Google Cloud Functions** for scalability.

3. Monitor chatbot interactions using **Google Analytics**.

4. Continuously update intents based on user feedback.


![](https://prod.superblogcdn.com/site_cuid_clnw4nrag2342701vpmufcj1n2w/images/screenshot-2025-02-26-231357-1740591897182-compressed.png)

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](https://dialogflow.cloud.google.com/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](https://www.heltar.com/blogs/whatsapp-business-api-the-complete-guide-2024-updated-cm199vwsk007qb98sogktqupg) 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](https://write.superblog.ai/sites/supername/heltar/posts/cm7dsv9940003ip0lk9d8mxh5/heltar.com) offers the best solutions to help you get started with WhatsApp Business API-powered automation. Contact us today!


---
This blog is powered by Superblog. Visit https://superblog.ai to know more.
---

