![twilio chatbot twilio chatbot](https://cdn2.hubspot.net/hubfs/2174253/here-twilio-img-1.png)
TWILIO CHATBOT HOW TO
(This blog is a continuation of How to Design a Chatbot. You will get a step-by-step process for setting up your Twilio and API.ai accounts, and integrating the two platforms together to form a simple SMS chatbot. If you are looking for Chatbot Development or Natural Language Processing services then do contact us or send your requirement at We would be happy to offer our expert services.In this tutorial, you can set up a simple SMS chatbot using the Twilio and API.ai platforms. Set environment variable in heroku heroku config:set GOOGLE_APPLICATION_CREDENTIALS='YOUR_JSON_FILE_PATH'įeel free to comment your doubts/questions. Now run following three commands one after one. Now run the below command and login with heroku via CLI.
TWILIO CHATBOT INSTALL
Now install Heroku CLI with sudo snap install -classic herokuĦ.
![twilio chatbot twilio chatbot](https://twilio-cms-prod.s3.amazonaws.com/images/splitordervariable.width-800.png)
![twilio chatbot twilio chatbot](https://twilio-cms-prod.s3.amazonaws.com/images/T6XREJ72iQmwRDjFYWwSEYgcNkNoOijJjxupjZ5DfyEoj.width-1000.png)
Keep the window open we will back here to paste the ngrok url in Request URL. Check the radio button “send an incoming message webhook”. Give service name and then select mixed from the dropdown.ġ2. NOTE : Don’t close the terminal we will start our nodejs server here.Ĭopy SID and paste in index.js as value of accountSID.Ĭopy Authtoken and paste in index.js as value of authToken.ġ1. By typing in the terminal export GOOGLE_APPLICATION_CREDENTIALS=”/full/path/to/your/json/file” NOTE: the json file and index.js must be in the same directory at the same level. Save the json file in the working directory where you have extracted the zip file. On clicking on the “create key” you will get the json file. Then open service account page in new tab by clicking on the service account.Ĭheck the service account is same as previous page Now copy the Project id and paste it in the index.js file as value of projectId. Now, download the json file for the service account.ĥ. This will install all the required libraries for the project.ģ. Now, browse to the directory where you extracted the folder and run npm install
TWILIO CHATBOT ZIP FILE
You can download the zip file by clicking here.Įxtract the zip file in the folder and change the working directory to the extracted folder.Ģ.
TWILIO CHATBOT CODE
To simplify it, we have created our own zip file which contains code for twilio only and also we have setup the code to run the server easily. But in that there is code for multiple platforms. You can download the integration code from the official github repo of Dialogflow.
![twilio chatbot twilio chatbot](https://twilio-cms-prod.s3.amazonaws.com/images/StHERj8Wu9RiVmFsUCbMjKtMDUeVFAfXiU-i9dp_M2DxU.width-1000.png)