Step 1: Understand What is Dialogflow
Dialogflow is Google’s natural language understanding platform that enables you to design and integrate a conversational user interface (chatbot) into mobile apps, web applications, devices, etc.
It uses:
-
Intents: what the user says
-
Entities: key data extracted from user input
-
Fulfillment: backend logic to perform actions
Step 2: Access Dialogflow
-
Log in using your Google account.
-
You will be redirected to Dialogflow's Console Dashboard.
Step 3: Create a New Agent
An Agent is your chatbot project.
-
Click the gear icon ⚙️ next to the dropdown in the left sidebar to open Settings.
-
Click “Create new agent”.
-
Fill in the following details:
-
Agent Name: e.g., HelpBot
-
Default Language: English (or your choice)
-
Default Time Zone: Select your local time zone
-
Google Project: Click on Create new Google project
Click Create.
It will take a few seconds to set up.
Step 5: Create Your First Intent
An Intent is a user query that triggers a response.
Default Intents:
Dialogflow creates two sample intents:
-
Default Welcome Intent (greeting users)
-
Default Fallback Intent (when chatbot doesn’t understand)
To Create Your Own Intent:
-
Click on Intents in the left menu.
-
Click “+ Create Intent”
-
Give it a name:
BookAppointment
Add Training Phrases
Training phrases are examples of what users might say. Dialogflow uses machine learning to match similar phrases.
Click on “Add Training Phrases” and enter these one by one:
-
I want to book an appointment
-
Schedule a meeting
-
Can I fix a doctor appointment?
-
Book a slot for me
-
I need to see a doctor
You can add as many as you like. More phrases = better accuracy.
-
Step 3: Add Responses
Responses are what the chatbot will reply to the user.
Scroll down to the Responses section and click “Add Response”.
Enter something like:
You can add multiple variations if you like:
-
"Okay, let's book an appointment. What date and time do you prefer?"
-
"I can schedule it for you. When would you like to come in?"
Save the Intent
-
After adding training phrases and responses, click the “Save” button at the top right.
-
You’ll see a loading spinner. Wait until the save is complete.
Test Your Intent
-
Look at the right-side panel in the Dialogflow console. This is the “Try it now” area.
-
Type:
I want to book an appointment
-
Press Enter
-
You should see:
-
The Intent matched:
BookAppointment
-
The Bot Response: your response message
-
If this happens, your intent is working correctly!
Lock Pro with Camera Unlock & Doorbell Connect
Node MCU Development Board
Smart Door Lock
Comments
Post a Comment