Skip to content

This is a webhook made in python (Flask) to perform actions in Dialogflow chatbot.

Notifications You must be signed in to change notification settings

krryptonian/Creating-Chatbot-Using-Python-Flask-and-DialogFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Creating Chatbot Using Python Flask & DialogFlow

PREREQUISITE

Make sure you have installed the following tools.

  • Download and install Python from here as per your supported OS.
  • IDE (Integrated Development Environment) PyCharm. optional

REQUIRED LIBRARIES

pip install Flask
pip install dialogflow

Service Account Setup

  1. In Dialogflow's console, go to settings ⚙ and under the general tab, you'll see the project ID section with a Google Cloud link to open the Google Cloud console. Open Google Cloud.
  2. In the Cloud console, go to the menu icon ☰ > APIs & Services > Credentials
  3. Under the menu icon ☰ > APIs & Services > Credentials > Create Credentials > Service Account Key.
  4. Under Create service account key, select New Service Account from the dropdown and enter. If you already have a service account key, select that.
  5. Give any name for the name and click Create. Give appropriate role.
  6. JSON file will be downloaded to your computer that you will need in the setup sections below.

Set up Dialogflow DetectIntent endpoint to be called from the App

  1. Inside root folder, replace the key.json in the credentials folder with your own credentials json file.
  2. In app.py, Change the GOOGLE_PROJECT_ID = "<YOUR_PROJECT_ID>" to your project ID