Skip to content

A Python Flask based script using the Dialogflow SDK to use Dialogflow's NLP in Snatchbot.

License

Notifications You must be signed in to change notification settings

pragnakalp/dialogflow-connector-for-snatchbot-using-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dialogflow Integration with Snatchbot using Python

Snatchbot is a one of the popular chatbot development platform where user can easily create chatbot for their purpose and integrate on multiple channels.

To take advantage of powerful NLP provided by Dialogflow this script is created to provide bridge between Dialogflow and Snatchbot responses.

It is a Flask based script in Python which uses Dialogflow SDK. It accepts request from Snatchbot, passes on to Dialogflow, get response from Dialogflow and pass it back to Snatchbot with Snatchbot compatible JSON.

Steps for integration

  1. Get your Agent Project Id from Dialogflow console.

Project ID

  1. Download Service Account Credential file from GCP.

Service Account

  1. Enter the file path downloaded above in the app.py file on line number 16.

  2. Run your code using Ngrok if you are using this integrator from local machine and copy the Ngrok url.

Run Ngrok

Ngrok

  1. Go to your snatchbot account and create a new bot or select existing bot.

  2. In the bot create new interaction of JSON API type. Select JSON API interaction

  3. In the JSON API interaction set the API Address of ngrok obtained in 4th step. Also, set the Error Message so that if snatchbot is not able to connect to your API URL then it will display this error message. Set API URL

  4. You're done! Now, when this JSON API interaction is called in your chat flow, it will make request to Dialogflow and fetch response from there.

This script is still work in progress and more features will be added in future. You are welcome to fork it and add more changes.

Developed by Pragnakalp Solutions - Chatbots Development(Dialogflow, Snatchbot, Chatfuel), Python Development

About

A Python Flask based script using the Dialogflow SDK to use Dialogflow's NLP in Snatchbot.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages