---
description: Ever thought about building a chatbot for your small business but thought it was too hard? This Dialogflow Tutorial will give you what you need to know.
title: How To Build a Chatbot with Dialogflow - Dialogflow Tutorial
image: https://assets2-proxy.respond.io/ph8r57dk1q9w/37xZPEZeETfwlzyKjkogga/f7585586701a7637678dfd79e673616c/AdvancedChatbotBlogCoverHowToArticles_2000_4d227d31963740914f81b02c4a423554.png
---

1. [Home ](/)
2. [\> Blogs ](/blog)
3. [\> How To Article](/category/how-to-article)

# How To Build a Chatbot with Dialogflow - Dialogflow Tutorial

[![Gerardo Salandra](https://assets2-proxy.respond.io/ph8r57dk1q9w/6N33r6J1VRPdiVQylKFTF1/c23cccbaea7e82943d31f48b7ba627b9/Jerry_Avatar.svg?q=70&w=400&fm=avif)](/author/gerardo-salandra)

[Gerardo Salandra](/author/gerardo-salandra)

· 31 Jan 2025

·

6 min read

![How To Build a Chatbot with Dialogflow - Dialogflow Tutorial](https://assets2-proxy.respond.io/ph8r57dk1q9w/37xZPEZeETfwlzyKjkogga/f7585586701a7637678dfd79e673616c/AdvancedChatbotBlogCoverHowToArticles_2000_4d227d31963740914f81b02c4a423554.png?q=70&w=400&fm=avif)

Follow along this video 3-part series and watch how a fictional small business owner learn how to build a Dialogflow agent, deploy it, and add features you can't get on Dialogflow alone. This Dialogflow Tutorial will help you get started on your journey. If you prefer a written text over videos please check out our article about [Using Rocketbots as a Dialogflow CRM](https://rocketbots.io/blog/dialogflow-crm-dialogflow-human-handoff/).

## Takeaways

By the end of this 15 minutes tutorial, you will be able to:

#### Part 1:

* Understand how Dialogflow (and other NLP engines) work
* Properly create and modify intents
* Identify your most urgent questions
* Connect Dialogflow to many messaging channels at once

#### Part 2:

* Create a Welcome Intent & Fallback Intent
* Identify the queries that your bot can't answer
* Pass (handoff) the conversation to a human if the Dialogflow fails
* Send Email notification when the Dialogflow agent fails

### Part 3:

* Hot to train and improve your DF agent
* How to send broadcast and updates to your DF users
* Build an automatic tag capturing agent

## Dialogflow Tutorial Part 1: Building a Basic Dialogflow Agent

![Setting up a Dialogflow Agent with respond.io](https://i.ytimg.com/vi_webp/FNCg9mSMoHY/hqdefault.webp) 

### **What’s a Chatbot?**

A chatbot is an Artificial Intelligence powered program that can answer questions automatically. Some of the popular messaging apps that you might already know include Facebook Messenger and WeChat. The main purpose is to engage customers and collect valuable information.

#### **Wait, Why Do I Need a Chatbot?**

Most customer inquiries that you receive are essentially asking about the same kind of questions: do you open on the weekends, what sort of products do you sell, and etc. They are mostly questions that can be easily answered, but the repetitiveness and volume of these questions still mean it’s time out of your (or your staff’s) day to address them. Follow the Rocketbots Chatbot Academy and we’ll show you how you can automate responses and more.

#### **Planning the Purpose of Chatbot**

**1** **Collect inquiries and FAQs**: Collect the most frequently asked questions. The questions are also called expressions in chatbot development. Basically, expressions represent a user’s desire or aim.

**2 Group the intentions**: Group the questions into their corresponding intentions. This is to group the expressions by the aim the user has so as to get a more clean and organized set of categories to handle. Sort them by the most common intents, such as opening hours, products, and location for the chatbot to tackle.

**3 Provide responses**: Provide a response that satisfies each intent.

### **Building Chatbot on DialogFlow**

**1.** **Create an Account**: Go to a free chatbot building tool like DialogFlow and make an account.

**2.** **Create an agent**: Go to the dashboard, and click “Add Agent” at the top left. Give the agent a name and make sure the agent is in the right language and time zone. Then click “Create”.

**3.** **Create intentions**: Create the first intention by clicking “create intent” at the top right, and give it the name “Opening Hours”. Proceed by clicking “Add Training Phrases” and input the expressions you’ve seen customers ask before, and any other expressions you think a user might say to get the same answer. It’s best practice to use a minimum of 20 expressions.

**4.** **Create responses**: Click “add response” by scrolling down the page. Then add the store business hours or other corresponding response to your intent. Save the intent at the top right, and repeat the process for each of the other 2 intents.

Now the chatbot is at its most basic level, and ready for deployment on Facebook.

### **Deploying Chatbot on Facebook Messenger**

**1.** **Connect a Channel** to Rocketbots: Go to the Rocketbots Platform settings. Click on the "Add Channel" button under Channel Settings, and add Facebook as a Channel.

**2\. Connect Dialogflow** to Rocketbots: Go to Rocketbots Platform settings. Under Integrations you will see Dialogflow as one of the option. Follow the instructions shown there.

## Dialogflow Tutorial Part 2: Adding **Human-Handoff and Notifications to your Chatbot**

![Human Handoff with Dialogflow & respond.io](https://i.ytimg.com/vi_webp/hFRkNcsB8tw/hqdefault.webp) 

### **Default Welcome Intent**

You may already notice whenever you use a chatbot, there’s always a greeting like “Hello” pops up right on the second you click on the chat box. But, this is actually the default welcome intent that naturally comes with the agents itself that you don’t have to input yourself. Facebook automatically adds the “Get Started” button to any chatbot that gets deployed on Messenger. As there’s no need for one when the bot is greeting the user for the first time, there are no training phrases inside the default welcome intent.

### **Guiding Your Users**

**1.** **Delete these default responses:** Replace them with 3 of our own such as the example as shown below. 

**2.** **Set the first response:** as “Hello!”, followed by “I am a chatbot to help answer questions about xxx” and finally “I’m still learning, so try to keep things simple for me!”

This can also let the user know what the purpose of the chatbot is, it’s less likely the user will ask it topics that it doesn’t know.

When the bot is being asked questions that it doesn’t know how to answer, then it will automatically revert it back to back to the Default Fallback Intent. And here’s how you can adjust the fallback intent response. 

### **Setting the Bot to Allow Human Handover**

**1.** **Edit the response:** Editing the response module of the Default Fallback Intent.

**2.** **Change your expression:** Change it to “I’m sorry, I haven’t learned how to answer your question. Would you like me to get the human agent to come to help you?” This would give users a chance to contact the human agent. 

**3.** **Input your expressions:** Input at least 20 expressions in the training phrases module that the user might say to let the bot know they’re interested in having the human agents to cut in and help.

### **Adding in the Notification**

**1.** **Add the parameters to the intent:** Add a code that marks the chatbot as “not done” on the Rocketbots platform, which would allow the human agent to know when users are pending for assistance on the platform.

**2.** **Input the values:** Type: RB\_MARKDONE and set the value as false. 

**3\. Enter the code:** Input another code that’s going to allow the Rocketbots Platform to notify the human agent when she/he’s been requested to help a user. Type: RB\_NOTIFY, and set the value as @user.name needs your help

### **Checking Your Bot**

**1.** **Delete the conversation;** Delete the chatbot conversation from Facebook Messenger, and start over again.

**2.** **Check the default welcome intent:** Now see if the new default welcome intent is working or not by asking the bot a question that it doesn’t know how to answer.

**3.** **Getting the request:** A request with the option to contact the human agent will pop up on the screen. Click on it. Then, it would send the human agent a notification on the platform, and via email that we’re looking for help. Check on your side to see if that’s the case.

Now you can have an improved chatbot that would lessen the number of errors it can encounter, and a backup strategy that lets the human agents jump in when the bot can no longer answer questions.

Congratulations! Now you know how to switch your bot for human agent takeover.

## Dialogflow Tutorial Part 3: **Improving your Chatbot and Broadcasting messages**

![Training A Dialogflow Agent](https://i.ytimg.com/vi_webp/CvoXkM_7Yac/hqdefault.webp) 

In this final section, you’ll get to learn how to train the chatbot and broadcast through it. The chatbot that you’ve built in the last two tutorials might can get you to answer customers’ inquiries fast; but there’s one problem – you still haven’t give it the ability to deal with the bot when it comes across questions that it doesn’t know how to answer at all or when the bot give out the wrong response. And the following will show you how to deal with situations like that.

### **How To Train Your Chatbot**

**1.** **Click on the training option to the left:** In this menu, there are rows of data. Each row is a single conversation.

**2.** **Click a conversation.** You’ll be brought to the sessions window. This is where you’ll train your chatbot. Each line you see here is a single request and the corresponding intent that it triggered.

**3.** **Mismatches**: If you see a request that matches the correct intent, don’t do anything. If a request is assigned to the incorrect intent, click the intent below, and search for the right one to assign. If the request was not assigned to any intents, you can click “click to assign” below, and assign it to the correct intent.

**4.** **Double check your corrections before you click approve.** As assigning a request to the wrong intent, or approving a mismatched request can cause your chatbot to learn how to make that mistake more often. 

**5.** **Click Approve.** Give the chatbot agent some time to learn how to train.

### **Create A New Intent To Solve Another Customer Inquiry**

**1.** **Start by creating an intent**. Use the same best practices as before.

**2\. Create at least 20 requests asking about the topic of Fruit Delivery.** Set the response as “We get fresh fruit delivered at sporadic times from different orchards and farms in the region, so we’ll let you know when there’s a delivery coming as soon as we know ourselves!”

**3.** **Add a parameter to this intent.** This can tag users who inquire about fruit deliveries. Click on Add Parameter, and type “RB\_ADDTAGS”, and set the value as Fruit Delivery. Remember to save the intent.

From now on, when a user asks the chatbot about fruit deliveries, they will be tagged in the Rocketbots Platform with the tag “Fruit Delivery”. You can now use the Broadcast feature on the Rocketbots Platform to update her curious users with updates on deliveries as soon as she knows.

### **Broadcasting the Updates**

**1\. Click on Broadcasts** to the left on the Rocketbots Platform.

**2.** **Select New Broadcast at the top right.** Here you’ll be able to write your broadcast message

**3.** **Select your channel or channels you’d like to broadcast to.** Choose the tag you want to target in your broadcast.

**4.** **Write your delivery update** Select Facebook as our channel, and then select the Fruit Delivery tag to target any users who have inquired about delivery updates.

Congratulations! Now you have officially completed the Rocketbots Academy Build a Basic Chatbot course.

There’s much more to building chatbots, so continue on to more advanced lessons, or stay tuned for more courses to come.

Your Dialogflow Tutorial is finished, happy chatbotting.

Turn customer conversations into business growth with respond.io. ✨

Manage calls, chats and emails in one place!

[ Book a Demo](https://cta-service-cms2.hubspot.com/web-interactives/public/v1/track/redirect?encryptedPayload=AVxigLJZtM4BfRkXBKSL59L5j%2FlaJ4%2BzD1NHrw8UnfY3qlAjv5e5x%2FLC6kTHaAzy%2BZArNHjwEPBjeaY%2Flegh7%2FlItLGZbpOSlRy%2B3HaHdvJTbK4816w%3D&webInteractiveContentId=131307604004&portalId=7250147&%5F%5Fhstc=4958508.ec36eb4a1acb5a2f1d2caa097ff2cfe6.1725863681681.1736738541926.1736745026317.279&%5F%5Fhssc=4958508.5.1736745026317&%5F%5Fhsfp=1189922200) [ Sign Up Free](https://cta-service-cms2.hubspot.com/web-interactives/public/v1/track/redirect?encryptedPayload=AVxigLJUZ9y86szSaqWmCnYSYMq0ZOk9XV2oCon%2FmNLPf8PPYjkz0WNyT3X6%2FNYXJ57JQd5OrqxmaPSa%2B7vmFBoJC5AM1ZN85A57D%2Ff8%2FTbyG9hd5BP9pbt7izF7v82BktzihajSsdiAfsC8q7M1poVVj%2FeAarUQTlFGjZdhnpE%2FS0oyP6r6zJeC35UP7Fj5%2FhBOQVo1fYZ5OQ0ThLMvpSdc7BkVWmpTOpdbJhdObPU%3D&webInteractiveContentId=131307603879&portalId=7250147&%5F%5Fhstc=4958508.ec36eb4a1acb5a2f1d2caa097ff2cfe6.1725863681681.1736738541926.1736745026317.279&%5F%5Fhssc=4958508.5.1736745026317&%5F%5Fhsfp=1189922200) 

## Further Reading

If your interested in using Dialogflow together with Rocketbots you'll want to check out the following:

* [Using Rocketbots as a Dialogflow CRM](https://rocketbots.io/blog/dialogflow-crm-dialogflow-human-handoff/)
* [Rocketbots Dialogflow Documentation](https://docs.rocketbots.io/dialogflow-integration)

Share this article

[![Telegram](https://assets1-proxy.respond.io/api/v1/image/assets%2F11f7a662b80a4675973850b067c01fa5%2F44daca77a4844f0c8fd29040ddeba057?width=22)](https://api.whatsapp.com/send?text=https://respond.io/blog/dialogflow-tutorial)[![Facebook](https://assets1-proxy.respond.io/api/v1/image/assets/11f7a662b80a4675973850b067c01fa5/fff57eeb01160bc604392f519b4f3461ca16f0fa1b6a587b20b142cdf1ad0ba7?placeholderIfAbsent=true&width=22)](https://www.facebook.com/sharer/sharer.php?u=https://respond.io/blog/dialogflow-tutorial)[![Linkedin](https://assets1-proxy.respond.io/api/v1/image/assets/11f7a662b80a4675973850b067c01fa5/7aaf8d87b5410844d83e06a4ed663e4f551b8c5ef51dbb20a8ff064a1eed9a0f?placeholderIfAbsent=true&width=22)](https://www.linkedin.com/sharing/share-offsite/?url=https://respond.io/blog/dialogflow-tutorial)[![Twitter](https://assets1-proxy.respond.io/api/v1/image/assets%2F11f7a662b80a4675973850b067c01fa5%2F4e03e02422a94e8eab9b8b41457c2371?width=22)](https://twitter.com/share?url=https://respond.io/blog/dialogflow-tutorial)

## Related posts 👩‍💻

* [![](https://assets2-proxy.respond.io/ph8r57dk1q9w/2oqQFglGKjjaHVJ8tzFoWn/dae58c7100ab3e6aadc197b8967ace36/Practical_Guide___Best_Omnichannel_CRM.png?q=70&w=1000&fm=avif)](/blog/best-omnichannel-crm)  
[10 Best Omnichannel CRM Platforms: Features & Pricing ComparedThe 10 best omnichannel CRM platforms: respond.io, Kustomer, Kommo, Salesforce, HubSpot, Zendesk, Intercom, Zoho CRM, Zendesk and Freshdesk.](/blog/best-omnichannel-crm)
* [![](https://assets2-proxy.respond.io/ph8r57dk1q9w/vr013lmO4xRSS30KcRV8T/8577db2181c4da2b4b4650ef13f7f93c/Practical_Guide___Best_AI_Chatbot_for_Website_Cover__1___1_.png?q=70&w=1000&fm=avif)](/blog/best-ai-chatbots-for-website)  
[Best AI Chatbots for Website: Top Platforms ComparedDiscover the best AI chatbots for websites in 2025: Respond.io, Intercom, Zendesk AI, Tidio, Chatbase, Drift, HubSpot Chatbot, ManyChat, Landbot](/blog/best-ai-chatbots-for-website)
* [![](https://assets2-proxy.respond.io/ph8r57dk1q9w/1TpzwG7GSnvYfqt5pQRkSu/33fb71cdb0416e51b471784944d51485/AI_Agents_for_Customer_Support.png?q=70&w=1000&fm=avif)](/blog/best-ai-agents-for-customer-support)  
[Best AI Agents for Customer Support in 2025: Pros, Cons & PricingExplore the best AI agents for customer support in 2025\. Compare pros, cons and pricing of top platforms like respond.io and Intercom.](/blog/best-ai-agents-for-customer-support)

3x Your Business Results with Respond.io 🚀

[Talk to sales](/demo)[Start free trial](https://app.respond.io/user/register)

2025-12-05T05:06:59.789Z

blogs

```json
[{"@context":"https://schema.org","@type":"Article","image":"https://assets2-proxy.respond.io/ph8r57dk1q9w/37xZPEZeETfwlzyKjkogga/f7585586701a7637678dfd79e673616c/AdvancedChatbotBlogCoverHowToArticles_2000_4d227d31963740914f81b02c4a423554.png","thumbnailUrl":"https://assets2-proxy.respond.io/ph8r57dk1q9w/37xZPEZeETfwlzyKjkogga/f7585586701a7637678dfd79e673616c/AdvancedChatbotBlogCoverHowToArticles_2000_4d227d31963740914f81b02c4a423554.png","headline":"How To Build a Chatbot with Dialogflow - Dialogflow Tutorial","alternativeHeadline":"How To Build a Chatbot with Dialogflow - Dialogflow Tutorial","genre":["How To Article"],"publisher":{"@type":"Organization","name":"Respond.io","sameAs":"https://respond.io","logo":{"@type":"ImageObject","url":"https://respond.io/logo/respond-io.webp"}},"url":"https://respond.io/blog/dialogflow-tutorial","datePublished":"2019-02-10T00:00:00.000Z","dateCreated":"2019-02-10T00:00:00.000Z","dateModified":"2025-01-31T03:12:18.599Z","description":"Ever thought about building a chatbot for your small business but thought it was too hard? This Dialogflow Tutorial will give you what you need to know.","author":{"@type":"Person","name":"Gerardo Salandra","url":"https://respond.io/author/gerardo-salandra"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://respond.io/blog/dialogflow-tutorial"}},{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://respond.io/"},{"@type":"ListItem","position":2,"name":"Blog","item":"https://respond.io/blog"},{"@type":"ListItem","position":3,"name":"How To Article","item":"https://respond.io/category/how-to-article"}]}]
{"@context":"https://schema.org","@type":"VideoObject","name":"Setting up a Dialogflow Agent with respond.io","uploadDate":"2025-12-05T05:07:00.203Z","description":"Setting up a Dialogflow Agent with respond.io","thumbnailUrl":"https://i.ytimg.com/vi/FNCg9mSMoHY/hqdefault.jpg","contentUrl":"https://www.youtube.com/watch?v=FNCg9mSMoHY","embedUrl":"https://www.youtube.com/embed/FNCg9mSMoHY"}
{"@context":"https://schema.org","@type":"VideoObject","name":"Human Handoff with Dialogflow & respond.io","uploadDate":"2025-12-05T05:07:00.343Z","description":"Human Handoff with Dialogflow & respond.io","thumbnailUrl":"https://i.ytimg.com/vi/hFRkNcsB8tw/hqdefault.jpg","contentUrl":"https://www.youtube.com/watch?v=hFRkNcsB8tw","embedUrl":"https://www.youtube.com/embed/hFRkNcsB8tw"}
{"@context":"https://schema.org","@type":"VideoObject","name":"Training A Dialogflow Agent","uploadDate":"2025-12-05T05:07:00.071Z","description":"Training A Dialogflow Agent","thumbnailUrl":"https://i.ytimg.com/vi/CvoXkM_7Yac/hqdefault.jpg","contentUrl":"https://www.youtube.com/watch?v=CvoXkM_7Yac","embedUrl":"https://www.youtube.com/embed/CvoXkM_7Yac"}
```
