Method: projects.locations.collections.dataConnector.buildActionInvocation

Builds an action invocation using the DataConnector.

HTTP request

POST https://discoveryengine.googleapis.com/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}:buildActionInvocation

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. DataConnector resource.

The data connector used for building the action invocation.

Request body

The request body contains data with the following structure:

JSON representation
{
  "actionName": string,
  "languageCode": string
}
Fields
actionName

string

Required. Name of the action.

For example: "send_email"

languageCode

string

Optional. Language to be used for status and error messages.

Response body

Response for the DataConnectorService.BuildActionInvocation method.

If successful, the response body contains data with the following structure:

JSON representation
{
  "actionInvocation": {
    object (ActionInvocation)
  }
}
Fields
actionInvocation

object (ActionInvocation)

The action invocation.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ActionInvocation

Represents an action invocation.

JSON representation
{
  "actionName": string,
  "args": {
    object
  },
  "dataConnector": string,
  "invocationId": string,
  "actionDisplayName": string,
  "userConfirmationMessage": string,
  "authorizationUrl": string,
  "resendQueryOnUserAuthorization": boolean,
  "parameterDeclaration": {
    object
  },
  "argSetCandidates": [
    {
      object
    }
  ]
}
Fields
actionName

string

Name of the action.

For example: "send_email"

args

object (Struct format)

Named arguments of the action.

For example: {"recipient": "tom@...", "subject": ... }

When offered to a user, this part might be editable.

If there are multiple options for the action arguments (e.g., multiple possible time slots for a calendar event), then this field describes the first option.

dataConnector

string

DataConnector resource.

The data connector used for performing the action.

invocationId

string

Output only. The action invocation ID.

actionDisplayName

string

Output only. Human-readable name of the action that is displayed to the user.

userConfirmationMessage

string

Output only. Human-readable message shown to the user along with the confirmation dialog.

authorizationUrl

string

Output only. Authorization URL.

resendQueryOnUserAuthorization

boolean

Output only. If true, caller must resend query upon user authorization.

parameterDeclaration

object (Struct format)

Output only. Description of the parameters of the action including rendering/validation information. Its format is based on the OpenAPI's parameters specification. Based on: https://swagger.io/docs/specification/describing-parameters/

Example:

{
    "type": "object",
    "properties": {
        "title": {
            "type": "string",
            "description": "Title of the event",
        },
        "startTime": {
            "type": "string",
            "format": "date-time",
            "description": (
                "Start time of the meeting, e.g. 2024-07-12T23:30"
            ),
        },
        "attendees": {
            "type": "array",
            "items": {"type": "string", "format": "email"},
            "description": "List of email addresses of attendees",
        },
        "duration": {
            "type": "integer",
            "format": "int32",
            "minimum": 5,
            "maximum": 240,
            "default": { "numberValue": 30 },
            "description": (
                "Duration of the meeting in minutes. Defaults to 30"
                " minutes."
            ),
        },
        "timezone": {
            "type": "string",
            "description": (
                'IANA Time Zone Database name, e.g. "Europe/Zurich". If'
                " omitted, timezone of the user will be used"
            ),
        },
        "eventType": {
            "type": "string",
            "enum": ["meeting", "focus_time", "out_of_office", "task"],
            "description": "Type of the event",
        },
    },
    "required": ["startTime", "title", "attendees"]
}
argSetCandidates[]

object (Struct format)

Output only. If there are multiple options for the action arguments (e.g., multiple possible time slots for a calendar event), these additional argument candidates are listed in this field.

Contains a list of argument sets, each of which is formatted similarly as the args field. The argument sets only contain the arguments that differ from the args field. When offered to a user, these values might be editable.

For example:

args contains the first option with all the arguments:

{"title": "Meeting with John", "startTime": "2024-08-01T13:30", ... }

argSetCandidates contains the rest of the options, but only the differing arguments are populated:

[{ "startTime": "2024-08-01T14:00" }, { "startTime": "2024-08-01T14:30" }, { "startTime": "2024-08-01T15:30" }]