Skip to content

Latest commit

 

History

History

spark

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Spark Integration for Dialogflow CX

Setup

Prerequisites

Creating a Spark Bot

  • Log in to Spark and go to the New Bot page.
  • Fill in the required fields and click the "Add Bot" button.

alt text

  • On the next screen, take the value for your bot’s access Token and replace the value for sparkAccessToken in the server.js file.

Deploying the Integration Using Cloud Run

In your local terminal, change the active directory to the repository’s root directory.

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.

gcloud builds submit --tag gcr.io/PROJECT-ID/dialogflow-spark

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.

gcloud beta run deploy --image gcr.io/PROJECT_ID/dialogflow-spark --service-account DIALOGFLOW_SERVICE_ACCOUNT --memory 1Gi
  • When prompted for a target platform, select a platform by entering the corresponding number (for example, 1 for Cloud Run (fully managed)).
  • When prompted for a region, select a region (for example, us-central1).
  • When prompted for a service name hit enter to accept the default,
  • When prompted to allow unauthenticated invocations press y,
  • Copy the URL given to you, and use it according to the README file in the given integration's folder.

Take the value for the server URL printed in the console after the completion of the execution of the above command and replace the value for targetUrl in the server.js file.

Redeploy the integration with the updated change by rerunning the above two commands.

More information can be found in Cloud Run documentation.

You can view a list of your active integration deployments under Cloud Run in the GCP Console.

Testing

To test your bot, either download the webex app and send a direct message to your bot using the username you specified earlier. This username should end in "@webex.bot"