top of page

Creating a Simple Bot with DialogFlow

Introduction


In today’s digital era, chatbots have become essential for businesses looking to enhance customer experiences and streamline operations.


In this blog post, we will explore how to develop a basic chatbot using DialogFlow, a popular conversational AI platform provided by Google.



Steps to create a simple chatbot (School Attendance) with DialogFlow


Step 1: Create a Dialogflow agent


  • Go to the Dialogflow console.

  • Sign in. If you’re a first-time user, then use your email to sign up.

  • Accept the terms and conditions, and you’ll be in the Dialogflow console.




  • To create an agent, click Create Agent. Provide the agent name and click on Create.


  • Now you created a functional bot that greets users with default welcome message. 



Step 2: Modify and Test the Default Intent


  • Click on Default Welcome Intent, there we can see training phrases and response.





  • In Default Response, delete the existing response and add a response message to get the student details( Name and the grade) and click on Save.



  • Intent Saved message will be displayed in the right side bottom.



  • Now let's try our bot.


  • Enter 'Hi' or 'Hello' in the Try in now box. Now Bot is responding with the new message we added in the Response "Hello! Welcome to the school attendance line. Please provide the student name and the grade."


Step 3: Create a custom Entity


Now Let's create a new Entity to add grade detail.


  • Click on Entities and Create Entity. Enter the Entity name ("Grade") and Save.





  • Now enter the grade one by one in "Click here to edit entry". To add more rows, click on "+Add a row". After adding all the grades, click on Save.


  • Now a new custom entity is created in the name of "Grade".



Step 4: Create a custom Intents


Now let's create new intent to get students details.


  • Click on Intents. Enter the Intents Name as "Student Detail" and Click on Create Intent.




  • In the Add user expression, add the Name and the Grade. Here you can see that DialogFlow will automatically extract the entities from your training phrase.




  • Add more user expressions with different Name and Grade.





  • And now add a response message. Here I have added the Parameter Name ($person) which will display the name of the student.


Step 5: Test the newly created intent using the chatbot


  • Now we get the response message from the Bot with the student name.




Step 6: Enable one-click web integration


Dialogflow provides many types of integration for your chatbot. Let’s look at a sample web user interface for our chatbot.


  • Click Integrations in the Dialogflow console and select Web Demo.




  • Then Click the URL to launch Web Demo.




  • Note that it also provides a code snippet that you can embed into your website to enable the chatbot.



Conclusion

Congratulations! Now you know how to create a simple chatbot and integrate that into your website.

Hope this article helped you!


71 views

Recent Posts

See All
bottom of page