This repo will allow to you to generate a simple conversational phone chatbot in less than 2 hours. You only have to follow below steps to configure your Twilio and Dialogflow accounts.
Go to Twilio and register a new account. Twilio will give you some free credit to test Twilio services, but it will limit you to use pre-authorized numbers to make tests. If you want to add new authorized numbers for test, you can go here.
If you want to make a real test, you need to top up your account. You can do it here.
To receive calls, you will need a Twilio phone number. Before you are be able to buy phone numbers, you will need to send some personal identity documents to Twilio. Twilio need these documents to associate your phone number to your identity.
You can verify your identity here.
When Twilio verifies your identity, you can buy new phone numbers here. If you want to deploy this repository and connect it to Twilio, you will need to buy a number with
You will need a Dialogflow Account too. You can create it here.
Once you have created your Dialogflow Account. You will need to create a new agent and obtain your agent
service account and your
project name. Follow these guides to make all work:
To extract your business metrics you will use Amplitude, an easy way of creating dashboards with your data. You can create your organization/project free account here.
You will need your API Key Token to configure Heroku <-> Amplitude connection. You can find it in
Manage Data > Your Project > Project Settings.
For response all Twilio calls, you will need to deploy this project on Heroku (you can use another cloud service if you prefer).
To deploy this repository on Heroku, you only have to click on the below button. Heroku will request you to have an account and will ask about the name that you want to give to your service and the zone where you want to deploy it.
Once you have deployed your project, the last step to configure it is to insert some Environment Variables. You will see your ENV variables on your project's
Settings tag. You need to insert this variables:
google-credentials.jsonGOOGLE_CREDENTIALS The content of your Dialogflow Agent Service Account file AMPLITUDE_API_KEY Your Amplitude API Key
The last step is to connect your Twilio number to your Heroku deployment. To do it, you will need your Heroku URL. You will find it at
Settings tag, inside
Copy this URL and go to Twilio Phone Numbers. Click on your number and add this configuration:Config Item Value ACCEPT INCOMING Voice Calls CONFIGURE WITH Webhooks, TwiML Bins, Functions, Studio, or Proxy A CALL COMES IN
[your_heroku_domain]/webhookCALL STATUS CHANGES