github-com-GoogleC...
github-com-GoogleC...
jrash06 Merge pull request #227 from josobar/master 7f691ed · last year
..
README.md
Setup
Prerequisites
Follow the instructions on the main README file in the root directory of this
repository.
Create a Twilio account.
Copy and paste the following text into a new file titled env created in the folder for
this integration.
Replace PROJECT_ID with your Google Cloud project ID.
Replace AGENT_ID with your Dialogflow CX agent ID.
Replace LOCATION with your agent's location code, e.g. "us-central-1."
TWILIO_AUTH_TOKEN = ''
PROJECT_ID = ''
LOCATION = ''
AGENT_ID = ''
LANGUAGE_CODE = ''
Retrieving Credentials
1. Log in to the Twilio Dashboard.
2. Under the "Account Info" section, take the values for Account SID and Auth Token
and replace the value for TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN in the
.env file.
Run the following command to save the state of your repository into GCP Container
Registry. Replace PROJECT-ID with your agent’s GCP Project ID.
Deploy your integration to Cloud Run using the following command. Replace
PROJECT_ID with your agent’s GCP project Id, and DIALOGFLOW_SERIVCE_ACCOUNT with
the Service Account which you acquired in the Service Account Setup step of the main
README file.
You can view a list of your active integration deployments under Cloud Run in the GCP
Console.
Setting up Phone Number
1. In the "Phone Number" section, go to Active numbers.
2. Click on the purchased number.
3. Underneath "Messaging", take the value for the server URL printed in the console
after the completion of the execution of the last command from the above section
to the "A message comes in" fill-in box. Set the first drop-down to Webhook and
the HTTP method to HTTP POST.
Complete
Now simply text the Twilio phone number you registered and your agent will respond.
WhatsApp Setup
This integration can be used as a webhook with Twilio to send WhatsApp messages.