This is an old revision of the document!


Google Dialog Flow

Reference: https://cloud.google.com/contact-center/ccai-platform/docs/Virtual_Agent

Step 1 Get the agent ID:

Open https://dialogflow.cloud.google.com/cx/projects.

Select the appropriate project. The list of configured agents is displayed.

Note the agent ID to be configured. If no new agents are created, you can select a preconfigured agent.

Step 2 Create a user via Google IAM (Identity and Access Management) and add the following roles: Dialogflow API admin, Service Account Token Creator, and Service Account user .

For more information, see https://cloud.google.com/iam/docs/creating-managing-service-accounts.

Step 3 Install and configure the Google SDK on your system.

For more information, see https://cloud.google.com/sdk/docs/quickstart.

Step 4 When you are asked to log in during the installation of Google SDK, log in using the ID of the agent for whom you want to create the conversation profile.

Note You can also log in using the same ID to the GCP CLI with the command gcloud auth login after installing the Google SDK.

Step 5 Run the following command: gcloud auth print-access-token –impersonate-service-account=Service Account ID

Service Account ID is found Service Account → 'OAuth 2 client ID' Field

creating Profile

What out for the double quotes when coping from website - it can get corrupted.

*Open Google SDK CLI *Login using the command gcloud auth login- which will open your browser and ask you to log into the account *to get the bearer token - impersonate the Service account you setup which should

  • Service Account Token Creator
  • Dialogflow API Admin

Here is an example

C:\Users\gerar\AppData\Local\Google\Cloud SDK>gcloud auth login
Your browser has been opened to visit:

https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=32555940559.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A8085%2F&scope=openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fsqlservice.login+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Faccounts.reauth&state=zJXB7ym2y2hkZ9WgjpXGhCLseJCq19&access_type=offline&code_challenge=hYx7bEqoDwuomQ4SOCo2ILqECtYUHs307YzVAU04T-I&code_challenge_method=S256

You are now logged in as [[email protected]].
Your current project is [mydemo-project1].  You can change this setting by running:
  $ gcloud config set project PROJECT_ID


C:\Users\gerar\AppData\Local\Google\Cloud SDK>gcloud auth print-access-token --impersonate-service-account=srv-account1@mydemo-project.iam.gserviceaccount.com
WARNING: This command is using service account impersonation. All API calls will be executed as [[email protected]].
ya29axb5555555555555555555555555555555555555555555555555555555555555555fiS7WfG594_z7X3tU40pPPL4f7b7jytNV5TdoBeN9y00aOf-0WUEvWY3CIxg-PA4A3PhhXGsS4x5QRKCtPg2DJvrr0pRI-jP2ybhJzvvSHf4mgaxR5ChqjCvGwNxGOX3pZgvQARGKQjrRn7ROrMfd2v5LQbwn_I9zKyrLZPw0axoQWX6HfL8D1SeB1cuyAS0frRI9QMuNAWnoHtuuXkAILEG_Hv6Dd-GMLLKiJaBsBt1eHkiW87wvWUDxwa9SUISFOBe3DI4WR-ZW-4yi2XldJWS2MP42u3py8RbxKqarvPUS3OqpGcjJDhNeaCYOMKrV0P23pCRmUQPU1LY7L_qLdIfwzXclV-F3OQ2a9GgNUJx15a2A3yuPIULnBbFIwiEr-KAFSbqGN0OvcYiGIPCrZ_--iYwl5MQUSKuml2cZHGljoBwkG6KRc2BBAQ7_pjz3SIdAIBGXOc2j-v1lok9YC8DPygvdKhvCWIZQ6S9ediWf65WdsZWWBcEc-7x022ST585DSIb0SJarzmo4j6ZMj7s1tsFwfpbwcvrZUFBZI363ZgbqzWVFzUOv8beMuYuB7xXa0Qoj0-oaI94r_-3lgsIs229BIS0m39i7XqpsX47Yr4-868B5twdiiye3-90o8fyJ8-d9-V9_wpkBgScSFiOgV2MkQqgVQkJ05_1y2UYQ9lh7Xm2Wh1MeMex1Zn3gMYBkfwnlUwY0Y7zclX6WvMMBJ9wRhUU8ia3_3srpU6_VrQFlSXvs0m4JxejeW-YjtoItRr122xo5mIFp26ienjS9VhZx-vY_YplFgxX79vsW_3Yk7jO5o7YZ1p3Z1nck_555555555555555555555555555_sSld8z6Bc9McnIeZ6gQRgBgIkS8Xo6-aIw12ZkFg8k3mRhJzMhhsQgJt5oyiFd7IyVod42wgzjJqdIrkX3

C:\Users\gerar\AppData\Local\Google\Cloud SDK>

Request

URL: https://europe-west1-dialogflow.googleapis.com/v2beta1/projects/my-dev-project1/locations/europe-west1/conversationProfiles Headers: Authorization: Bearer <google token - from sdk)

{
"name": "TACCXTest",
"automatedAgentConfig": {
    "agent": "projects/my-dev-project1/locations/europe-west1/agents/55555555-eb4a-4fac-b23f-12ef145e9f71"
    },
"displayName": "TACCXTest",
"humanAgentAssistantConfig": {
    "messageAnalysisConfig": {    
        "enableEntityExtraction": true,
        "enableSentimentAnalysis": true
        }
    }
}

Response

200 OK

{
    "name": "projects/my-dev-project1/locations/europe-west1/conversationProfiles/B6gbdisORoSW6OLlZ8_-Zw",
    "displayName": "TACCXTest",
    "automatedAgentConfig": {
        "agent": "projects/my-dev-project1/locations/europe-west1/agents/55555555-eb4a-4fac-b23f-12ef145e9f71/environments/draft"
    },
    "humanAgentAssistantConfig": {
        "notificationConfig": {},
        "messageAnalysisConfig": {
            "enableEntityExtraction": true,
            "enableSentimentAnalysis": true
        }
    },
    "languageCode": "en-US"
}

Cloud Connect Server

file list activelog hybrid/log/cloudconnectmgmt
file tail activelog hybrid/log/cloudconnectmgmt/cloudconnectmgmt_error.log
file tail activelog hybrid/log/cloudconnectmgmt/cloudconnectmgmt.log

VVB Server

file tail activelog speechserver/logs/SpeechServer/SpeechServer.log
  • vendors/google/dialogflow.1678880049.txt.gz
  • Last modified: 2023/03/15 11:34
  • by gerardorourke