Setting up Dialogflow CX to save audio recordings in Google Cloud Storage - dialogflow-cx

I have setup a Google Cloud Storage bucket in the same project as my Dialogflow CX Agent, and in the settings for the agent, under the Speech & IVR tab, set the Google Cloud Storage URI to match that bucket:
gs://my-bucket/calls
I can see that the Dialogflow Agent has access to the bucket as it has a Service Agent listed in the Permissions tab of the bucket.
Furthermore, since I successfully enabled logging, I can see that the bucket is correctly configured, as in the log payload I can see the following property:
interactiveVoiceResponseSettings: {
audioExportGcsDestination: {
uri: "gs://my-bucket/calls"
}
}
However, when making calls, nothing appears on that bucket's folder.
Is there another configuration option I'm missing to enable this feature?
Or perhaps it is not yet functional?
Thank you.

The 'Google Cloud Storage URI' option in the Dialogflow CX Speech and IVR agent settings is currently supported for the following use cases:
If you use 1-click telephony partner integrations (for example,
AudioCodes or Avaya)
If you use the Contact Center AI solution
provided by Google partners.
If you use 1-click telephony partner integrations, and the 'Google Cloud Storage URI' option is not working for you, please check the following:
Go to the GCP project IAM and find the automatically created service account of the format one-click#df-cx-<ALPHANUMERIC_VALUE>-<ALPHANUMERIC_VALUE>.iam.gserviceaccount.com
Make sure that this service account has the 'GCS Storage Bucket Owner' role assigned to it.
Note that the 'Google Cloud Storage URI' option doesn't support the detect Intent API requests.

Related

The application utilizing the gmail-api must run in Goolge Cloud Platform?

When I want to use Google's Gmail API within my web application in order to receive and send emails, then must this web application be deployed in the Google Cloud as a precondition and any on-premise hosting will fail? Is this the price one must pay to use it?
Your application's code can be hosted anywhere you want. However, you do need to create a Google Cloud account to create a project, enable the APIs and get the application credentials:
Cloud APIs use application credentials for identifying the calling applications. Credential types include API keys, OAuth 2.0 clients, and service accounts. You can use Google Cloud console to create, retrieve, and manage your application credentials. For more information about application credentials, see Authentication Overview.
Once you have your project's credentials you can just create the code within your current app and use the credentials wherever they are needed. You can refer to one of Google's quickstarts for that.
Sources:
Getting started with Google Cloud APIs
Developing on Google Workspace
Gmail API Overview

How can enable Dialogflow API using google cloud API

How can I enable the dialogflow api automatically, I want to create a dialogflow agent using the api, but get an error:
google.api_core.exceptions.PermissionDenied: 403 Dialogflow API has not been used in project 79080971371 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/dialogflow.googleapis.com/overview?project=79080971371 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry
There is no way to automatically enable APIs in projects on Google developer console. There are some things in your project that need to be configured by you the developer.
You need to manually go to your project and then go to library and enable the API you are trying to access. In this case enable dialogflow api

Is it possible to create a custom app for Microsoft Teams that dosn't use a central service provider?

I am working on adding support for our cloud storage solution to MS Teams but there is no central server you can send http messages to and get meaningful relies back from. I have no experience with creating Teams apps so I was hoping someone with Teams apps experience could tell me if this is even possible. At this point I only need my app to work on Windows and OS X.
This is how I would like my Teams App to work:
Each member of the team already has our cloud storage app running locally on their machine which provides access to the files.
Within MS Teams the user adds a file reference to a message via a message extension that would result in a link unfurl creating a card that contains an 'Open' button. The URL in the card would be one generated by our locally running cloud storage app. Other members of the team could then open this file by clicking the 'Open' button. The action of the open button would be to send the URL to our cloud storage app that would then open the local copy of the file on that team members machine.
Is it possible to do something like this within a Teams app? The communication between the Teams app and our cloud storage app would be done over our own protocol.
If it weren't for the fact that all bot communication must be done over https rather than http the local cloud storage app could act as the server.
All the communication in Teams with 3P apps needs to happen over https public endpoint. You could use ngrok to tunnel to local.

Google Cloud Logging Authentication / permissions

I am using the Golang library cloud.google.com/go/logging and want to send runtime logging.
Already have a GOOGLE_APPLICATION_CREDENTIALS .json file - and am using google storage and firebase - so I know the credentials are working.
With logging, I get an error "Error 403: The caller does not have permission, forbidden"
The account in the application credentials is a service account and I have been looking at the IAM permissions. There is not an obvious permission for logging (there are other stackdriver permissions, for debug, trace etc but these don't seem to work).
So assuming I am in the right place so far - what permissions does the service account need in order to send logging data to stackdriver logging?
If we look at the API for writing entries to a log we find that the IAM permission logging.logEntries.create is required.
A more detailed article can be found at Access control guide.
This describes a variety of roles including:
roles/logging.logWriter
According to the official documentation:
Using Stackdriver Logging library for Go requires the Cloud IAM Logs
Writer role on Google Cloud. Most Google Cloud environments provide
this role by default.
1.App Engine grants the Logs Writer role by default.
2.On Google Kubernetes Engine, you must add the logging.write access scope when creating the cluster:
3.When using Compute Engine VM instances, add the cloud-platform access scope to each instance.
4.To use the Stackdriver Logging library for Go outside of Google Cloud, including running the library on your own workstation, on your data center's computers, or on the VM instances of another cloud provider, you must supply your Google Cloud project ID and appropriate service account credentials directly to the Stackdriver Logging library for Go.
You can create and obtain service account credentials manually. When specifying the Role field, use the Logs Writer role. For more information on Cloud Identity and Access Management roles, go to Access control guide.
Setting Up Stackdriver Logging for Go
gcloud iam service-accounts list
gcloud projects add-iam-policy-binding my-project-123 \
--member serviceAccount:my-sa-123#my-project-123.iam.gserviceaccount.com \
--role roles/logging.logWriter

Google IAM api to add GSuite domain wide delegation

I am working on a application that is using google service account with domain wide delegation.
I don't want client to do setting of domain wide delegation and download private key. I could create private key using IAM api.
is there a way to achieve domain wide delegation also via API ?
Thanks
Google's IAM API is part of their Google Cloud API's. As far as I'm aware, there is no equivalent API for standard Google developer project IAM, which is where you would do anything around projects targeting G Suite API's (and the only place where there is a Domain Wide Delegation setting for a service account, AFAIK).
You can grant a service account permission at the Organization level in Google Cloud, but I'm not sure whether that has any effect on the GSuite access controls, as nferrell mentions.

Resources