github-com-GoogleC...-1
github-com-GoogleC...-1
Dialogflow integrations with multiple platforms including KIK, Skype, Spark, Twlio, Twitter and
Viber
cloud.google.com/dialogflow/
Apache-2.0 license
Star Notifications
Introduction
The purpose of this documentation is to set up an integration deployment to connect
your existing Dialogflow agent to various third party chat service platforms.
If you do not have an existing Dialogflow agent, you can set one up by reading the
documentation here.
Initial Setup
1. On the gcloud CLI documentation page, select your OS and follow the instructions
for the installation.
2. Run gcloud config get-value project to check the GCP Project configured.
3. Go into the Dialogflow agent’s settings and check the Project ID associated with
the agent. The GCP Project configured in the gcloud CLI should match the agent’s
Project ID.
4. If the project IDs do not match, run gcloud config set project PROJECT-ID ,
replacing PROJECT-ID with the Project ID from step 3.
Follow the steps below to create a Service Account and set up the integration.
1. Go into the Dialogflow agent’s settings and click on the Project ID link to open its
associated GCP Project.
2. Click on the navigation menu in the GCP console, hover over "IAM & admin", and
click "Service accounts".
3. Click on "+ CREATE SERVICE ACCOUNT", fill in the details, and give it the
"Dialogflow API Client" role.
If deploying this integration outside of GCP, you may authenticate using a key file.
Deploying on Cloud Run or Cloud Functions obviates this process.
1. Click on "+ Create Key" and download the resulting JSON key file.
2. Save the JSON key file in the desired platform subdirectory.
3. Set the GOOGLE_APPLICATION_CREDENTIALS environmental variable on the
deployment environment to the absolute path of Service Account JSON key file.
See this guide for details.
Setup
1. Go into the Dialogflow agent’s settings and click on the Project ID link to open its
associated GCP Project.
2. Click on the navigation menu in the GCP console and click "Billing". Set up and
enable billing for the project.
3. Enable Cloud Build and Cloud Run API for the project here.
4. Clone this git repository onto your local machine or development environment:
git clone [repository url]
5. Open the root directory of the repository on your local machine or development
environment.
If you have not done so already, copy your Service Account JSON key file to the desired
platform subdirectory.
Platform-specific Instructions
The integration requires platform credentials from the intended platform to function
properly.
Follow the steps in the README file in the relevant platform subdirectory to obtain the
credentials and setup the server.js file to deploy and start the integration:
Post-deployment
In your local terminal, run the following command and select the previously chosen
target platform to list active deployments:
Then run the following command, replacing SERVICE-NAME with the name of the
service you want to shut down, and select the same settings chosen when deploying in
order to shut down the deployment.
Multiple Integrations
To set up multiple integration deployments simultaneously, repeat all of the instructions
for each deployment. While it is possible to make changes to the existing deployment
repository and re-deploy it under a different name, it would make it difficult to
retroactively make changes to previous deployments.
Changing Integration Behavior
The behavior of an integration can be customized via the addition of your own
developer code or by editing the server.js file in the platform subdirectory.
Releases
No releases published
Packages
No packages published
Contributors 17
+ 3 contributors
Languages
Terms Privacy Security Status Docs Contact Manage cookies Do not share my personal information