EventObject

EventObject

A Google add-on interaction event that contains data about a user's interaction with an add-on within a host app.

The event object is passed as JSON to an add-on's callback function or trigger (for AppsScript), or https endpoint (for HTTP), when a user interacts with an add-on within a host app. The event object stores a host app event object defined by each host app, as well as a common event object containing some common fields related to the event.

For more information see Event objects.

JSON representation
{
  "commonEventObject": {
    object (CommonEventObject)
  },
  "authorizationEventObject": {
    object (AuthorizationEventObject)
  },

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "calendar": {
    object (CalendarEventObject)
  },
  "drive": {
    object (DriveEventObject)
  },
  "gmail": {
    object (GmailEventObject)
  },
  "sheets": {
    object (SheetsEventObject)
  },
  "slides": {
    object (SlidesEventObject)
  },
  "docs": {
    object (DocsEventObject)
  },
  "chat": {
    object (ChatEventObject)
  },
  "workflow": {
    object (WorkflowEventObject)
  }
  // End of mutually exclusive fields.
}
Fields
commonEventObject

object (CommonEventObject)

An object containing information common to all event objects, regardless of the host application.

authorizationEventObject

object (AuthorizationEventObject)

Only set for requests to HTTP endpoints

The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
calendar

object (CalendarEventObject)

Only present if the calling host is Google Calendar. An object containing calendar and event information.

drive

object (DriveEventObject)

Only present if the calling host is Google Drive. An object containing Drive information.

gmail

object (GmailEventObject)

Only present if the calling host is Gmail. An object containing Gmail information.

sheets

object (SheetsEventObject)

Only present if the calling host is Google Sheets. An object containing Sheets information.

slides

object (SlidesEventObject)

Only present if the calling host is Google Slides. An object containing Slides information.

docs

object (DocsEventObject)

Only present if the calling host is Google Docs. An object containing Docs information.

chat

object (ChatEventObject)

Only present if the calling host is Google Chat. An object containing Chat information.

workflow

object (WorkflowEventObject)

Only present if the calling host is Google Workspace Studio. An object containing workflow information.

End of mutually exclusive fields.

CommonEventObject

The common event object is the portion of the overall event object that carries general, host-independent information to the add-on from the user's client. This information includes details such as the user's locale, host app, and platform.

In addition to homepage and contextual triggers, add-ons construct and pass event objects to action callback functions when the user interacts with widgets. Your add-on's callback function can query the common event object to determine the contents of open widgets in the user's client. For example, your add-on can locate the text a user has entered into a TextInput widget in the eventObject.commentEventObject.formInputs object.

For Chat apps, the name of the function that the user invoked when interacting with a widget.

JSON representation
{
  "userLocale": string,
  "hostApp": enum (HostApp),
  "platform": enum (Platform),
  "timeZone": {
    object (TimeZone)
  },
  "formInputs": {
    string: {
      object (Inputs)
    },
    ...
  },
  "parameters": {
    string: string,
    ...
  },
  "invokedFunction": string
}
Fields
userLocale

string

Disabled by default. The user's language and country/region identifier in the format of ISO 639 language code-ISO 3166 country/region code. For example, en-US.

To turn on this field, you must set addOns.common.useLocaleFromApp to true in your add-on's manifest. Your add-on's scope list must also include https://www.googleapis.com/auth/script.locale. See Accessing user locale and timezone for more details.

hostApp

enum (HostApp)

Indicates the host app the add-on is active in when the event object is generated. Possible values include the following:

  • GMAIL
  • CALENDAR
  • DRIVE
  • DOCS
  • SHEETS
  • SLIDES
  • CHAT
platform

enum (Platform)

The platform enum which indicates the platform where the event originates (WEB, IOS, or ANDROID). Not supported by Chat apps.

timeZone

object (TimeZone)

Disabled by default. The timezone ID and offset from Coordinated Universal Time (UTC). To turn on this field, you must set addOns.common.useLocaleFromApp to true in your add-on's manifest. Your add-on's scope list must also include https://www.googleapis.com/auth/script.locale. See Accessing user locale and timezone for more details.

Only supported for the event types CARD_CLICKED and SUBMIT_DIALOG.

formInputs

map (key: string, value: object (Inputs))

A map containing the current values of the widgets in the displayed card. The map keys are the string name values assigned to each input widget (such as TextInput.name, SelectionInput.name, DateTimePicker.name, or DecoratedText.SwitchControl.name).

The structure of the map value object is dependent on the widget type:

Note: The following examples are formatted for Apps Script's V8 runtime. If you're using Rhino runtime, you must add [""] after the value. For example, instead of e.commonEventObject.formInputs.employeeName.stringInputs.value[0], format the event object as e.commonEventObject.formInputs.employeeName[""].stringInputs.value[0]. To learn more about runtimes in Apps Script, see the V8 Runtime Overview.

  • Single-valued widgets (for example, a TextInput widget, or a SelectionInput widget of type DROPDOWN or RADIO_BUTTON): a StringInputs object containing a single-element list (or an empty list if no selection is made).

Example: for a text input widget with employeeName as its name, access the text input value with: e.commonEventObject.formInputs.employeeName.stringInputs.value[0].

  • Multi-valued widgets (for example, a SelectionInput widget of type CHECK_BOX, SWITCH, or MULTI_SELECT): a StringInputs object containing the list of selected item value strings.

Example: for a multi-value widget with participants as its name, access the value array with: e.commonEventObject.formInputs.participants.stringInputs.value.

  • A DecoratedText.SwitchControl widget: a StringInputs object. When selected is true, stringInputs.value contains the switch's value field (or "" if value was not specified; if multiple switches share the same name, each selected switch's value is included in the list). When selected is false, the switch's value is omitted from stringInputs.value.

  • A date-time picker (DateTimePickerType.DATE_AND_TIME): a DateTimeInput object.

Example: For a picker with a name of myDTPicker, access the DateTimeInput object using e.commonEventObject.formInputs.myDTPicker.dateTimeInput.

Example: For a picker with a name of myDatePicker, access the DateInput object using e.commonEventObject.formInputs.myDatePicker.dateInput.

Example: For a picker with a name of myTimePicker, access the TimeInput object using e.commonEventObject.formInputs.myTimePicker.timeInput.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

parameters

map (key: string, value: string)

Any additional parameters you supply to an action using actionParameters or Action.setParameters().

Developer Preview: For add-ons that extend Google Chat, to suggest items based on what the users type in multiselect menus, use the value of the "autocomplete_widget_query" key (event.commonEventObject.parameters["autocomplete_widget_query"]). You can use this value to query a database and suggest selectable items to users as they type. For details, see Collect and process information from Google Chat users.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

invokedFunction

string

Name of the function to invoke.

This field doesn't populate for Google Workspace Add-ons that extend Google Chat. Instead, to receive function data like identifiers, add-ons that extend Chat should use the parameters field. See Build interactive interfaces for Chat apps.

HostApp

The Google Workspace application for a Google Workspace add-on or Google Chat app.

For add-ons, the Workspace application from which a Google Workspace add-on launches. For Chat apps, the host app is always CHAT.

Enums
UNSPECIFIED_HOST_APP Google can't identify a host app.
GMAIL The add-on launches from Gmail.
CALENDAR The add-on launches from Google Calendar.
DRIVE The add-on launches from Google Drive.
DEMO Not used.
DOCS The add-on launches from Google Docs.
MEET The add-on launches from Google Meet.
SHEETS The add-on launches from Google Sheets.
SLIDES The add-on launches from Google Slides.
DRAWINGS The add-on launches from Google Drawings.
CHAT A Google Chat app.

Platform

Identifies which platform this call originated from.

Enums
UNKNOWN_PLATFORM
WEB
IOS
ANDROID

TimeZone

The timezone ID and offset from Coordinated Universal Time (UTC). Only supported for the event types CARD_CLICKED and SUBMIT_DIALOG.

JSON representation
{
  "id": string,
  "offset": integer
}
Fields
id

string

The IANA TZ time zone database code, such as "America/Toronto".

offset

integer

The user timezone offset, in milliseconds, from Coordinated Universal Time (UTC).

Inputs

Types of data that users can input on cards or dialogs. The input type depends on the type of values that the widget accepts.

JSON representation
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "stringInputs": {
    object (StringInputs)
  },
  "dateTimeInput": {
    object (DateTimeInput)
  },
  "dateInput": {
    object (DateInput)
  },
  "timeInput": {
    object (TimeInput)
  }
  // End of mutually exclusive fields.
}
Fields
The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
stringInputs

object (StringInputs)

A list of strings that represent the values that the user inputs in a widget.

If the widget only accepts one value, such as a TextInput widget, the list contains one string object. If the widget accepts multiple values, such as a SelectionInput widget of checkboxes, the list contains a string object for each value that the user inputs or selects.

dateTimeInput

object (DateTimeInput)

Date and time input values from a DateTimePicker widget that accepts both a date and time.

dateInput

object (DateInput)

Date input values from a DateTimePicker widget that only accepts date values.

timeInput

object (TimeInput)

Time input values from a DateTimePicker widget that only accepts time values.

End of mutually exclusive fields.

StringInputs

Input parameter for regular widgets. For single-valued widgets, it is a single value list. For multi-valued widgets, such as checkbox, all the values are presented.

JSON representation
{
  "value": [
    string
  ]
}
Fields
value[]

string

An list of strings entered by the user.

DateTimeInput

Date and time input values.

JSON representation
{
  "msSinceEpoch": string,
  "hasDate": boolean,
  "hasTime": boolean
}
Fields
msSinceEpoch

string (int64 format)

Time since epoch time, in milliseconds.

hasDate

boolean

Whether the datetime input includes a calendar date.

hasTime

boolean

Whether the datetime input includes a timestamp.

DateInput

Date input values.

JSON representation
{
  "msSinceEpoch": string
}
Fields
msSinceEpoch

string (int64 format)

Time since epoch time, in milliseconds.

TimeInput

Time input values.

JSON representation
{
  "hours": integer,
  "minutes": integer
}
Fields
hours

integer

The hour on a 24-hour clock.

minutes

integer

The number of minutes past the hour. Valid values are 0 to 59.

AuthorizationEventObject

Encapsulates authorization information for the add-on request

JSON representation
{
  "userOAuthToken": string,
  "userIdToken": string,
  "systemIdToken": string,
  "authorizedScopes": [
    string
  ]
}
Fields
userOAuthToken

string

The end user OAuth access token, authorized with the requested scopes. (After oAuth consent unbundling, this will be authorized with end-user authorized scopes)

userIdToken

string

An end-user ID token, if appropriate ID scopes are requested

systemIdToken

string

An ID token for the G Suite Add-ons service account for this deployment

authorizedScopes[]

string

List of OAuth scopes authorized by the user.

CalendarEventObject

The Calendar event object is the portion of the overall event object that carries information about a user's calendar and calendar events. It's only present in an event object if the host application is Google Calendar.

The following table lists the fields present in the calendar field of an event object. Fields marked as User-generated data are present in the event object if and only if the data is present in the Calendar event and the add-on sets its addOns.calendar.currentEventAccess manifest field to READ or READ_WRITE.

JSON representation
{
  "id": string,
  "recurringEventId": string,
  "calendarId": string,
  "organizer": {
    object (Organizer)
  },
  "attendees": [
    {
      object (Attendee)
    }
  ],
  "conferenceData": {
    object (ConferenceData)
  },
  "capabilities": {
    object (Capabilities)
  }
}
Fields
id

string

The event ID.

recurringEventId

string

The ID of a recurring event.

calendarId

string

The calendar ID.

organizer

object (Organizer)

An object representing the organizer of the event.

attendees[]

object (Attendee)

User-generated data. A list of the attendees of the calendar event.

conferenceData

object (ConferenceData)

User-generated data. An object representing any conference data associated with this event, such as Google Meet conference details.

capabilities

object (Capabilities)

User-generated data. An object describing the capabilities of the add-on to view or update event information.

Organizer

JSON representation
{
  "email": string
}
Fields
email

string

The event organizer's email address.

Attendee

Attendee objects carry information about individual attendees to Google Calendar events. This information is present in the event object if and only if the data is present in the Calendar event and the add-on sets its addOns.calendar.currentEventAccess manifest field to READ or READ_WRITE.

JSON representation
{
  "email": string,
  "displayName": string,
  "organizer": boolean,
  "self": boolean,
  "resource": boolean,
  "optional": boolean,
  "responseStatus": string,
  "comment": string,
  "additionalGuests": integer
}
Fields
email

string

The attendee email address.

displayName

string

The attendee displayed name.

organizer

boolean

true if the attendee is an organizer for this event.

self

boolean

true if this attendee represents the calendar in which this event appears; false otherwise.

resource

boolean

true if the attendee represents a resource, such as room or piece of equipment; false otherwise.

optional

boolean

true if the attendance for this attendee is marked as optional; false otherwise.

responseStatus

string

The attendee's response status. Possible values include the following:

  • accepted: The attendee has accepted the event invitation.
  • declined: The attendee has declined the event invitation.
  • needsAction: The attendee has not responded to the event invitation.
  • tentative: The attendee has tentatively accepted the event invitation.
comment

string

The attendee's response comment, if any.

additionalGuests

integer

The number of additional guests the attendee had indicated they are bringing. Defaults to zero.

ConferenceData

Conference data objects carry information about conferences that are attached to Google Calendar events. These can be Google conference solutions, such as Google Meet, or third-party conferences. This information is present in the event object if and only if the data is present in the Calendar event and the add-on sets its addOns.calendar.currentEventAccess manifest field to READ or READ_WRITE.

JSON representation
{
  "conferenceId": string,
  "conferenceSolution": {
    object (ConferenceSolution)
  },
  "entryPoints": [
    {
      object (EntryPoint)
    }
  ],
  "notes": string,
  "parameters": {
    object (Parameters)
  }
}
Fields
conferenceId

string

The ID of the conference. This ID is meant to allow applications to keep track of conferences; you shouldn't display this ID to users.

conferenceSolution

object (ConferenceSolution)

An object representing the conference solution, such as Hangouts or Google Meet.

entryPoints[]

object (EntryPoint)

The list of conference entry points, such as URLs or phone numbers.

notes

string

Additional notes (such as instructions from the domain administrator or legal notices) about the conference to display to the user. Can contain HTML. The maximum length is 2048 characters.

parameters

object (Parameters)

An object containing a map of defined parameter data for use by the add-on.

ConferenceSolution

JSON representation
{
  "iconUri": string,
  "key": {
    object (Key)
  },
  "name": string
}
Fields
iconUri

string

The URI for the user-visible icon representing this conference solution.

key

object (Key)

The key which uniquely identifies the conference solution for this event.

name

string

The user-visible name of this conference solution (not localized).

Key

JSON representation
{
  "type": string
}
Fields
type

string

The conference solution type. Possible values include the following:

EntryPoint

Entry point objects carry information about the established means of accessing a given conference, such as by phone or video. This information is present in the event object if and only if the data is present in the Calendar event and the add-on sets its addOns.calendar.currentEventAccess manifest field to READ or READ_WRITE.

JSON representation
{
  "accessCode": string,
  "entryPointType": string,
  "label": string,
  "meetingCode": string,
  "passcode": string,
  "password": string,
  "pin": string,
  "uri": string,
  "regionCode": string,
  "entryPointFeatures": [
    string
  ]
}
Fields
accessCode

string

The access code used to access the conference. The maximum length is 128 characters. Conference providers typically only use a subset of {accessCode, meetingCode, passcode, password, pin} to provide access to conferences. Match and only ever display the fields the conference provider uses.

entryPointType

string

The type of entry point. Possible values are the following:

  • more: Additional conference joining instructions, such as alternate phone numbers. A conference can only have one more entry point; if present at least one other type of entry point is also required.
  • phone: Join the conference via a phone number. A conference can have zero or more phone entry points. Google Calendar only displays the first two phone entry points, after formatting and sorting alphabetically.
  • sip: Join the conference over SIP. A conference can have at most one sip entry point.
  • video: Join the conference over HTTP. A conference can have at most one video entry point.
label

string

The user-visible label for the entry point URI (not localized).

meetingCode

string

The meeting code used to access the conference. The maximum length is 128 characters. Conference providers typically only use a subset of {accessCode, meetingCode, passcode, password, pin} to provide access to conferences. Match and only ever display the fields the conference provider uses.

passcode

string

The passcode used to access the conference. The maximum length is 128 characters. Conference providers typically only use a subset of {accessCode, meetingCode, passcode, password, pin} to provide access to conferences. Match and only ever display the fields the conference provider uses.

password

string

The password used to access the conference. The maximum length is 128 characters. Conference providers typically only use a subset of {accessCode, meetingCode, passcode, password, pin} to provide access to conferences. Match and only ever display the fields the conference provider uses.

pin

string

The PIN used to access the conference. The maximum length is 128 characters. Conference providers typically only use a subset of {accessCode, meetingCode, passcode, password, pin} to provide access to conferences. Match and only ever display the fields the conference provider uses.

uri

string

The URI of the entry point. The maximum length is 1300 characters. The formatting depends on the entry point type:

  • more: A http: or https: schema is required.
  • phone: A tel: schema is required. The URI should include the entire dial sequence (for example, "tel:+12345678900,,,12345678;1234").
  • sip: A sip: or sips: schema is required. For example "sip:12345678@myprovider.com".
  • video: A http: or https: schema is required.
regionCode

string

Region code of the phone number. Needed by users if the URI doesn't include a country code. Values are based on the public CLDR list of region codes.

entryPointFeatures[]

string

Features of the entry point. Currently these features only apply to phone entry points:

  • toll: The entry point is a toll phone call.
  • toll_free: The entry point is a toll-free phone call.

Parameters

JSON representation
{
  "addOnParameters": {
    object (AddOnParameters)
  }
}
Fields
addOnParameters

object (AddOnParameters)

A map of parameter string keys and values. These keys and values are defined by the add-on developer to attach information to a specific conference for the add-on's use.

AddOnParameters

JSON representation
{
  "parameters": {
    string: string,
    ...
  }
}
Fields
parameters

map (key: string, value: string)

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

Capabilities

JSON representation
{
  "canSeeAttendees": boolean,
  "canAddAttendees": boolean,
  "canSeeConferenceData": boolean,
  "canSetConferenceData": boolean,
  "canAddAttachments": boolean
}
Fields
canSeeAttendees

boolean

User-generated data. true if the add-on can read the event attendee list; false otherwise.

canAddAttendees

boolean

User-generated data. true if the add-on can add new attendees to the event attendee list; false otherwise.

canSeeConferenceData

boolean

User-generated data. true if the add-on can read the event conference data; false otherwise.

canSetConferenceData

boolean

User-generated data. true if the add-on can update the event conference data; false otherwise.

canAddAttachments

boolean

User-generated data. true if the add-on can add new attachments to the event; false otherwise.

DriveEventObject

The Drive event object is the portion of the overall event object that carries information about a user's Google Drive and its contents. It's only present in an event object if the host application is Google Drive.

JSON representation
{
  "selectedItems": [
    {
      object (DriveItemMetadata)
    }
  ],
  "activeCursorItem": {
    object (DriveItemMetadata)
  }
}
Fields
selectedItems[]

object (DriveItemMetadata)

A list of items (files or folders) selected in Drive.

activeCursorItem

object (DriveItemMetadata)

The Drive item that is currently active.

DriveItemMetadata

Drive item objects carry information about specific Drive items, such as files or folders.

JSON representation
{
  "id": string,
  "iconUrl": string,
  "mimeType": string,
  "title": string,
  "addonHasFileScopePermission": boolean
}
Fields
id

string

The ID of the selected item.

iconUrl

string

The URL of the icon that represents the selected item.

mimeType

string

The MIME type of the selected item.

title

string

The title of the selected item.

addonHasFileScopePermission

boolean

If true, the add-on has requested and received https://www.googleapis.com/auth/drive.file scope authorization for this item. Otherwise, this field is false.

If the add-on uses a more permissive scope such as https://www.googleapis.com/auth/drive or https://www.googleapis.com/auth/drive.readonly, this field isn't relevant. Always use the least permissive scopes possible when designing add-ons to protect user information.

GmailEventObject

The Gmail event object is the portion of the overall event object that carries information about a user's Gmail messages. It's only present in an event object if the host application is Gmail.

JSON representation
{
  "messageId": string,
  "threadId": string,
  "accessToken": string,
  "toRecipients": [
    string
  ],
  "ccRecipients": [
    string
  ],
  "bccRecipients": [
    string
  ]
}
Fields
messageId

string

The ID of the currently open Gmail message.

threadId

string

The currently open Gmail thread ID.

accessToken

string

The Gmail-specific access token. You can use this token with the GmailApp.setCurrentMessageAccessToken(accessToken) method to grant your add-on temporary access to a user's currently open Gmail message or let your add-on compose new drafts.

toRecipients[]

string

Disabled by default. The list of "To:" recipient email addresses currently included in a draft the add-on is composing. To turn on this field, you must set the addOns.gmail.composeTrigger.draftAccess field in your manifest to METADATA.

ccRecipients[]

string

Disabled by default. The list of "CC:" recipient email addresses currently included in a draft the add-on is composing. To turn on this field, you must set the addOns.gmail.composeTrigger.draftAccess field in your manifest to METADATA.

bccRecipients[]

string

Disabled by default. The list of "BCC:" recipient email addresses currently included in a draft the add-on is composing. To turn on this field, you must set the addOns.gmail.composeTrigger.draftAccess field in your manifest to METADATA.

SheetsEventObject

The Sheets event object is the portion of the overall event object that carries information about a user's document and its contents. It's only present in an event object if the add-on extends Google Sheets.

JSON representation
{
  "id": string,
  "title": string,
  "addonHasFileScopePermission": boolean,
  "matchedUrl": {
    object (MatchedUrl)
  }
}
Fields
id

string

Only present if the https://www.googleapis.com/auth/drive.file scope has been authorized by the user. The ID of the spreadsheet open in the Sheets UI.

title

string

Only present if the https://www.googleapis.com/auth/drive.file scope has been authorized by the user. The title of the spreadsheet open in the Sheets UI.

addonHasFileScopePermission

boolean

If true, the add-on has requested and received https://www.googleapis.com/auth/drive.file scope authorization for the spreadsheet open in the Sheets UI; otherwise this field is false.

matchedUrl

object (MatchedUrl)

Only present if the following conditions are met:

  • https://www.googleapis.com/auth/workspace.linkpreview has been authorized by the user.
  • The URL matches the host pattern specified in the LinkPreviewTriggers trigger.

The URL of the link that generates a preview in Google Sheets. To use this field, you must configure the LinkPreviewTriggers in your add-on’s manifest. See Preview links with smart chips for more details.

Example payload for when a user previews the link https://www.example.com/12345:

"sheets" : {
  "matchedUrl" : {
    "url" : "https://www.example.com/12345"
  }
}

MatchedUrl

Event object returned with link preview requests.

JSON representation
{
  "url": string
}
Fields
url

string

The URL that was matched.

SlidesEventObject

The Slides event object is the portion of the overall event object that carries information about a user's document and its contents. It's only present in an event object if the add-on extends Google Slides.

JSON representation
{
  "id": string,
  "title": string,
  "addonHasFileScopePermission": boolean,
  "matchedUrl": {
    object (MatchedUrl)
  }
}
Fields
id

string

Only present if the https://www.googleapis.com/auth/drive.file scope has been authorized by the user. The ID of the presentation open in the Slides UI.

title

string

Only present if the https://www.googleapis.com/auth/drive.file scope has been authorized by the user. The title of the presentation open in the Slides UI.

addonHasFileScopePermission

boolean

If true, the add-on has requested and received https://www.googleapis.com/auth/drive.file scope authorization for the presentation open in the Slides UI; otherwise this field is false.

matchedUrl

object (MatchedUrl)

Only present if the following conditions are met:

  • https://www.googleapis.com/auth/workspace.linkpreview has been authorized by the user.
  • The URL matches the host pattern specified in the LinkPreviewTriggers trigger.

The URL of the link that generates a preview in Google Slides. To use this field, you must configure the LinkPreviewTriggers in your add-on’s manifest. See Preview links with smart chips for more details.

Example payload for when a user previews the link https://www.example.com/12345:

"slides" : {
  "matchedUrl" : {
    "url" : "https://www.example.com/12345"
  }
}

DocsEventObject

The Docs event object is the portion of the overall event object that carries information about a user's document and its contents. It's only present in an event object if the add-on extends Google Docs.

JSON representation
{
  "id": string,
  "title": string,
  "addonHasFileScopePermission": boolean,
  "matchedUrl": {
    object (MatchedUrl)
  }
}
Fields
id

string

Only present if the https://www.googleapis.com/auth/drive.file scope has been authorized by the user. The ID of the document open in the Docs UI.

title

string

Only present if the https://www.googleapis.com/auth/drive.file scope has been authorized by the user. The title of the document open in the Docs UI.

addonHasFileScopePermission

boolean

If true, the add-on has requested and received https://www.googleapis.com/auth/drive.file scope authorization for the document open in the Docs UI; otherwise this field is false.

matchedUrl

object (MatchedUrl)

Only present if the following conditions are met:

  • https://www.googleapis.com/auth/workspace.linkpreview has been authorized by the user.
  • The URL matches the host pattern specified in the LinkPreviewTriggers trigger.

The URL of the link that generates a preview in Google Docs. To use this field, you must configure the LinkPreviewTriggers in your add-on’s manifest. See Preview links with smart chips for more details.

Example payload for when a user previews the link https://www.example.com/12345:

"docs" : {
  "matchedUrl" : {
    "url" : "https://www.example.com/12345"
  }
}

ChatEventObject

A Google Chat app event object payload sent from Google server to add-ons. Payloads can be used to identify the type of event.

JSON representation
{
  "type": enum (EventType),
  "user": {
    object (User)
  },
  "space": {
    object (Space)
  },
  "eventTime": string,

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "messagePayload": {
    object (MessagePayload)
  },
  "addedToSpacePayload": {
    object (AddedToSpacePayload)
  },
  "removedFromSpacePayload": {
    object (RemovedFromSpacePayload)
  },
  "buttonClickedPayload": {
    object (ButtonClickedPayload)
  },
  "widgetUpdatedPayload": {
    object (WidgetUpdatedPayload)
  },
  "appCommandPayload": {
    object (AppCommandPayload)
  },
  "systemCommandPayload": {
    object (SystemCommandPayload)
  }
  // End of mutually exclusive fields.
}
Fields
type

enum (EventType)

The type of the event, only populated for App Home events in Chat apps that are not add-ons.

user

object (User)

The user who interacts with the Chat app.

space

object (Space)

The space in which the event occurred, only populated for App Home events in Chat apps that are not add-ons.

eventTime

string (Timestamp format)

The timestamp indicating when the event object occurs.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

The payload of the event object. Payloads are dependent on the event object type. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
messagePayload

object (MessagePayload)

A user sends the Chat app a message, or @mentions the Chat app in a space. App command invocations (such as slash commands and quick commands) are delivered in appCommandPayload instead.

addedToSpacePayload

object (AddedToSpacePayload)

A user adds the Chat app to a Chat space, or a Google Workspace administrator installs the Chat app in direct message spaces for users in their organization.

removedFromSpacePayload

object (RemovedFromSpacePayload)

A user removes the Chat app from a space.

buttonClickedPayload

object (ButtonClickedPayload)

Represents payload data when a user interacts with an interactive element of a card or dialog that triggers an Action callback. Despite the name, this payload is populated for all card and dialog Action callbacks—not only button clicks, but also onChangeAction triggers, onClick actions, CardAction clicks, and dialog submission or cancellation (SUBMIT_DIALOG and CANCEL_DIALOG).

If a user interacts with a dialog, the ButtonClickedPayload's isDialogEvent field is set to true and includes a DialogEventType.

The complete payload also includes commonEventObject.formInputs and commonEventObject.parameters.

widgetUpdatedPayload

object (WidgetUpdatedPayload)

A user updates a widget in an in-stream card or in a dialog.

The complete payload also includes CommonEventObject.parameters['autocomplete_widget_query'].

appCommandPayload

object (AppCommandPayload)

A user invokes an app command.

systemCommandPayload

object (SystemCommandPayload)

A user invokes a system command.

End of mutually exclusive fields.

EventType

The type of the event, only populated for App Home events in Chat apps that are not add-ons.

Enums
EVENT_TYPE_UNSPECIFIED Default value for the enum. DO NOT USE.
APP_HOME A user opens a direct message from a Chat app that uses app home. Only the type, user, and space fields are included for events of this type. For more information, see Build a homepage for a Google Chat app.
SUBMIT_FORM A user submits information in an app home card. Only the type, user, and space fields are included for events of this type. For more information, see [Build a homepage for a Google Chat app]((https://developers.google.com/workspace/chat/send-app-home-card-message).

MessagePayload

A user sends the Chat app a message, or @mentions the Chat app in a space. App command invocations (such as slash commands and quick commands) use AppCommandPayload instead.

JSON representation
{
  "space": {
    object (Space)
  },
  "message": {
    object (Message)
  },
  "configCompleteRedirectUri": string
}
Fields
space

object (Space)

Required. The Chat space in which the event object occurs.

message

object (Message)

The message that triggers the event object.

configCompleteRedirectUri

string

Optional. The URL the Chat app should redirect the user to after they complete an authorization or configuration flow outside of Google Chat. For more information, see Connect a Chat app with other services & tools.

AddedToSpacePayload

A user adds the Chat app to a space, or a DM between the app and a user is created.

JSON representation
{
  "space": {
    object (Space)
  },
  "interactionAdd": boolean,
  "configCompleteRedirectUri": string
}
Fields
space

object (Space)

Required. The Chat space in which the event object occurs.

interactionAdd

boolean

Whether the app was added to the space with a user interaction (e.g., by @ mentioning the Chat app or invoking with a slash command). If this is set to true then there will be a separate event object associated with the interaction itself dispatched to the Chat app.

configCompleteRedirectUri

string

Optional. The URL the Chat app should redirect the user to after they complete an authorization or configuration flow outside of Google Chat. For more information, see Connect a Chat app with other services & tools.

RemovedFromSpacePayload

A user removes the Chat app from a space.

JSON representation
{
  "space": {
    object (Space)
  }
}
Fields
space

object (Space)

Required. The Chat space in which the event object occurs.

ButtonClickedPayload

A user interacts with an interactive element of a card or dialog from a Chat Add-on that triggers an Action callback. Despite the name, this payload is populated for all card and dialog Action callbacks, including button clicks, onChangeAction triggers, onClick actions, CardAction clicks, and dialog submission or cancellation (SUBMIT_DIALOG and CANCEL_DIALOG).

If a user interacts with a dialog, the ButtonClickedPayload's isDialogEvent field is set to true and includes a DialogEventType. This payload maps to SUBMIT_FORM and CARD_CLICKED event types for Chat apps that are not add-ons.

The complete payload also includes CommonEventObject.form_inputs and CommonEventObject.parameters.

JSON representation
{
  "space": {
    object (Space)
  },
  "message": {
    object (Message)
  },
  "isDialogEvent": boolean,
  "dialogEventType": enum (DialogEventType)
}
Fields
space

object (Space)

Required. The Chat space in which the event object occurs.

message

object (Message)

The message that triggers the event object.

isDialogEvent

boolean

For ButtonClicked and Message event objects, whether the user is interacting with or about to interact with a dialog.

dialogEventType

enum (DialogEventType)

The type of dialog event object received.

DialogEventType

For event objects that contain ButtonClicked or AppCommand event payloads, the types of interactions with dialogs.

To learn more about Google Chat app event objects, see Receive and respond to interactions with your Google Chat app.

Enums
DIALOG_EVENT_TYPE_UNSPECIFIED Default value. Unspecified.
REQUEST_DIALOG A user opens a dialog.
SUBMIT_DIALOG A user clicks an interactive element of a dialog. For example, a user fills out information in a dialog and clicks a button to submit the information.
CANCEL_DIALOG A user closes a dialog without submitting information, or the dialog is canceled.

WidgetUpdatedPayload

A user updates a widget in an in-stream card or dialog.

The complete payload also includes CommonEventObject.parameters['autocomplete_widget_query'].

JSON representation
{
  "space": {
    object (Space)
  }
}
Fields
space

object (Space)

Required. The Chat space in which the event object occurs.

AppCommandPayload

A user invokes an app command.

JSON representation
{
  "appCommandMetadata": {
    object (AppCommandMetadata)
  },
  "space": {
    object (Space)
  },
  "thread": {
    object (Thread)
  },
  "message": {
    object (Message)
  },
  "configCompleteRedirectUri": string,
  "isDialogEvent": boolean,
  "dialogEventType": enum (DialogEventType)
}
Fields
appCommandMetadata

object (AppCommandMetadata)

Populated for app commands, including slash commands and quick commands.

space

object (Space)

Optional. The Chat space in which the event object occurs.

thread

object (Thread)

Optional. The thread in which the event object occurs, if applicable. This field is populated if the event object is associated with a specific message or thread.

message

object (Message)

Optional. The message that triggers the event object, if applicable. This field is only populated for slash commands.

configCompleteRedirectUri

string

Optional. The URL the user should be redirected to after they complete an authorization or configuration flow outside of Google Chat. For more information, see Connect a Chat app with other services & tools.

isDialogEvent

boolean

Optional. Whether the user is interacting with or about to interact with a dialog.

dialogEventType

enum (DialogEventType)

Optional. The type of dialog event object received. This field only applies if isDialogEvent is true.

AppCommandMetadata

Metadata about a Chat app command.

JSON representation
{
  "appCommandId": integer,
  "appCommandType": enum (AppCommandType)
}
Fields
appCommandId

integer

The ID for the command specified in the Chat API configuration.

appCommandType

enum (AppCommandType)

The type of Chat app command.

AppCommandType

The type of Chat app command. For details, see Types of Chat app commands.

Enums
APP_COMMAND_TYPE_UNSPECIFIED Default value. Unspecified.
SLASH_COMMAND A slash command. The user sends the command in a Chat message.
QUICK_COMMAND A quick command. The user selects the command from the Chat menu in the message reply area.
MESSAGE_ACTION A message action. The user selects the command from the message context menu in Chat.

SystemCommandPayload

A user invokes a system command.

JSON representation
{
  "systemCommandMetadata": {
    object (SystemCommandMetadata)
  },
  "space": string,
  "thread": {
    object (Thread)
  }
}
Fields
systemCommandMetadata

object (SystemCommandMetadata)

Metadata about the system command that was invoked.

space

string

Optional. The Chat space in which the event object occurs.

thread

object (Thread)

Optional. The thread in which the event object occurs, if applicable. This field is populated if the event object is associated with a specific message or thread.

SystemCommandMetadata

Metadata about a system command that is triggered by the user.

JSON representation
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "cancelStream": {
    object (CancelStream)
  }
  // End of mutually exclusive fields.
}
Fields
The system command invoked. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
cancelStream

object (CancelStream)

Command for cancelling an active stream message.

End of mutually exclusive fields.

CancelStream

Command for cancelling an active stream message.

JSON representation
{
  "streamMessage": string
}
Fields
streamMessage

string

Required. The resource name of the stream message on which the cancel command was performed.

Format: spaces/{space}/streamMessages/{streamMessage}

WorkflowEventObject

LINT.IfChange The event object passed to Workflow add-ons.

JSON representation
{
  "executionMetadata": {
    object (ExecutionMetadata)
  },
  "triggerEventSource": enum (TriggerEventSource),

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "actionInvocation": {
    object (ActionInvocation)
  },
  "triggerCreation": {
    object (TriggerCreation)
  },
  "triggerDeletion": {
    object (TriggerDeletion)
  },
  "resourceRetrieval": {
    object (ResourceRetrieval)
  },
  "elementConfiguration": {
    object (ElementConfiguration)
  },
  "resourceFieldsDefinitionRetrieval": {
    object (ResourceFieldsDefinitionRetrieval)
  },
  "elementUiAutocomplete": {
    object (ElementUiAutocomplete)
  }
  // End of mutually exclusive fields.
}
Fields
executionMetadata

object (ExecutionMetadata)

Metadata about the workflow execution.

triggerEventSource

enum (TriggerEventSource)

Source of the triggering events.

The type of workflow event payload. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
actionInvocation

object (ActionInvocation)

Invocation of a workflow action.

triggerCreation

object (TriggerCreation)

Creation of a workflow trigger.

triggerDeletion

object (TriggerDeletion)

Deletion of a workflow trigger.

resourceRetrieval

object (ResourceRetrieval)

Retrieval of a resource (used for variable inflation).

elementConfiguration

object (ElementConfiguration)

Configuration of a workflow element.

resourceFieldsDefinitionRetrieval

object (ResourceFieldsDefinitionRetrieval)

The retrieval of field definitions supported by a resource.

elementUiAutocomplete

object (ElementUiAutocomplete)

Autocomplete suggestions for the currently rendered card.

End of mutually exclusive fields.

ActionInvocation

Invocation of a workflow action.

JSON representation
{
  "inputs": {
    string: {
      object (VariableData)
    },
    ...
  },
  "triggerId": string,
  "flowLevelContext": {
    object (FlowLevelContext)
  }
}
Fields
inputs

map (key: string, value: object (VariableData))

Map of the input variables keyed by input variable name.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

triggerId

string

Trigger ID to use for async action responses.

flowLevelContext

object (FlowLevelContext)

Optional. Flow-level context from preceding steps.

VariableData

Represents variable data, which can hold multiple values of different types.

JSON representation
{
  "booleanValues": [
    boolean
  ],
  "integerValues": [
    string
  ],
  "floatValues": [
    number
  ],
  "stringValues": [
    string
  ],
  "timestampValues": [
    string
  ],
  "resourceReferences": [
    {
      object (ResourceReference)
    }
  ],
  "emailAddressValues": [
    string
  ],
  "googleUserValues": [
    string
  ],
  "textFormatValues": [
    {
      object (WorkflowTextFormat)
    }
  ]
}
Fields
booleanValues[]

boolean

Boolean values.

integerValues[]

string (int64 format)

Integer values.

floatValues[]

number

Float values.

stringValues[]

string

String values.

timestampValues[]

string (Timestamp format)

Timestamp values.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

resourceReferences[]

object (ResourceReference)

Resource references (IDs).

emailAddressValues[]

string

Email address values.

googleUserValues[]

string

Google user values in the format users/{user}.

textFormatValues[]

object (WorkflowTextFormat)

Workflow Text Format values.

ResourceReference

Id value of application specific resource.

JSON representation
{
  "resourceType": {
    object (ResourceType)
  },
  "resourceId": string
}
Fields
resourceType

object (ResourceType)

The type of the resource this ID points to.

resourceId

string

ID of the resource.

ResourceType

Name of custom resource type.

JSON representation
{
  "workflowBundleId": string,
  "workflowResourceDefinitionId": string
}
Fields
workflowBundleId

string

ID of the workflow bundle that owns this resource type. This is optional and if empty it's considered to be the same bundle where it's being used.

workflowResourceDefinitionId

string

Unique identifier of the resource. This is only required to be unique within the same bundle.

WorkflowTextFormat

A block of text with rich formatting options including styles, hyperlinks, and interactive elements.

JSON representation
{
  "textFormatElements": [
    {
      object (TextFormatElement)
    }
  ]
}
Fields
textFormatElements[]

object (TextFormatElement)

A collection of text format elements.

TextFormatElement

A single element within a WorkflowTextFormat message, which can be a chip, styled text, a hyperlink, or a list container.

JSON representation
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "text": string,
  "chip": {
    object (Chip)
  },
  "styledText": {
    object (StyledText)
  },
  "hyperlink": {
    object (Hyperlink)
  },
  "listContainer": {
    object (ListContainer)
  }
  // End of mutually exclusive fields.
}
Fields
Element that represents one of several possible text format elements. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
text

string

Text in the text format.

chip

object (Chip)

Clickable chip in the text format.

styledText

object (StyledText)

Styled text in the text format.

listContainer

object (ListContainer)

List container in the text format.

End of mutually exclusive fields.

Chip

A clickable chip in the text format.

JSON representation
{
  "icon": {
    object (Icon)
  },
  "label": string,
  "url": string
}
Fields
icon

object (Icon)

The icon displayed in the chip.

label

string

The text displayed in the chip.

url

string

The URL to navigate to when the chip is clicked.

Icon

An icon in the chip.

JSON representation
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "iconUrl": string,
  "materialIconName": string
  // End of mutually exclusive fields.
}
Fields
The icon displayed in the chip. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
iconUrl

string

Display a custom icon hosted at an HTTPS URL.

For example:

"iconUrl":
"https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png"

Supported file types include .png and .jpg.

materialIconName

string

The icon name defined in the Google Material Icon, for example, check_box. Any invalid names are abandoned and replaced with empty string and results in the icon failing to render.

End of mutually exclusive fields.

StyledText

Text element with styles such as bold, italic and color.

JSON representation
{
  "text": string,
  "styles": [
    enum (Style)
  ],
  "fontWeight": enum (FontWeight),
  "color": {
    object (Color)
  },
  "wrapStyle": enum (WrapStyle)
}
Fields
text

string

The main content of the text.

styles[]

enum (Style)

A collection of styles applied to the text.

fontWeight

enum (FontWeight)

The font weight of the text.

color

object (Color)

The color of the text.

wrapStyle

enum (WrapStyle)

The wrap style of the text.

Style

Enum for different text styles such as italic, underline, etc.

Enums
STYLE_UNSPECIFIED No style applied. DO NOT USE.
ITALIC Italic style.
UNDERLINE Underline style.
STRIKETHROUGH Strikethrough style.
LINE_BREAK Line break.
UPPERCASE Uppercase style.
CODE Code.
CODE_BLOCK Code block.

FontWeight

Enum for different font weights.

Enums
FONT_WEIGHT_UNSPECIFIED Standard weight with normal thickness. DO NOT USE.
LIGHT Lighter weight with reduced thickness.
MEDIUM Intermediate weight between light and bold.
BOLD Heavier weight with increased thickness.

WrapStyle

Enum for different wrap styles.

Enums
WRAP_STYLE_UNSPECIFIED No wrap style specified.
NO_WRAP No wrap style.

ListContainer

Container for list items, where each list item can contain multiple TextFormatElement's.

JSON representation
{
  "listNestLevel": string,
  "listType": enum (ListType),
  "listItems": [
    {
      object (ListItem)
    }
  ]
}
Fields
listNestLevel

string (int64 format)

The nest level of the list. Starts from 0 for the top level, and increases by 1 for each nested list.

listType

enum (ListType)

The type of the list.

listItems[]

object (ListItem)

A collection of list items.

ListType

Enum for different list types.

Enums
LIST_TYPE_UNSPECIFIED No list type specified. DO NOT USE.
ORDERED Ordered list.
UNORDERED Unordered list.
BLOCKQUOTE Represents a blockquote list.

ListItem

A list item.

JSON representation
{
  "textFormatElements": [
    {
      object (TextFormatElement)
    }
  ]
}
Fields
textFormatElements[]

object (TextFormatElement)

A collection of text format elements.

FlowLevelContext

Flow-level context containing outputs from preceding steps.

JSON representation
{
  "stepContexts": [
    {
      object (StepContext)
    }
  ]
}
Fields
stepContexts[]

object (StepContext)

Optional. List of preceding steps. The order matters, so make sure the execution order is maintained in this list.

StepContext

Step context metadata and outputs for flow-level context.

JSON representation
{
  "stepId": string,
  "outputs": {
    string: {
      object (VariableData)
    },
    ...
  }
}
Fields
stepId

string

Optional. Unique ID of the step in the workflow graph.

outputs

map (key: string, value: object (VariableData))

Optional. Map of output variables produced by this step, keyed by variable name.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

TriggerCreation

Creation of a workflow trigger.

JSON representation
{
  "triggerId": string,
  "triggerType": enum (TriggerType),
  "inputs": {
    string: {
      object (VariableData)
    },
    ...
  },
  "notifyUri": string
}
Fields
triggerId

string

Unique identifier of the trigger provided during creation.

triggerType

enum (TriggerType)

Type of the trigger.

inputs

map (key: string, value: object (VariableData))

Map of the input variables keyed by input variable name.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

notifyUri

string

The endpoint that will be called when the trigger fires.

TriggerType

Type of the trigger.

Enums
TRIGGER_TYPE_UNDEFINED Default value. DO NOT USE.
REPEATING The trigger will fire every time the input conditions are met.

TriggerDeletion

Deletion of a workflow trigger.

JSON representation
{
  "triggerId": string
}
Fields
triggerId

string

Unique identifier of the trigger provided during creation.

ResourceRetrieval

Retrieval of a resource.

JSON representation
{
  "resourceReference": {
    object (ResourceReference)
  }
}
Fields
resourceReference

object (ResourceReference)

Type and ID of the resource to be retrieved.

ElementConfiguration

Invocation when configuring a workflow element.

JSON representation
{
  "inputs": {
    string: {
      object (VariableData)
    },
    ...
  },
  "displayDestination": enum (DisplayDestination),
  "nodeId": string,
  "workflowId": string,
  "availableVariables": [
    {
      object (VariableReference)
    }
  ]
}
Fields
inputs

map (key: string, value: object (VariableData))

Map of the input variables keyed by input variable name. This map could be empty. Used when configuring single workflow element (trigger or action) in workflow home.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

displayDestination

enum (DisplayDestination)

The destination of the element configuration card. Elements can use this field to return different configuration card layouts based on the destination.

nodeId

string

The node id of the primitive config being rendered.

workflowId

string

The workflow id of the primitive config being rendered.

availableVariables[]

object (VariableReference)

Available variables ordered by node position.

DisplayDestination

Indicates where the returning element configuration card will be displayed.

Enums
DISPLAY_DESTINATION_UNSPECIFIED Default value. DO NOT USE.
DISPLAY_DESTINATION_SIDE_PANEL Configuration card is to be displayed in the Side Panel.
DISPLAY_DESTINATION_FULL_SCREEN Configuration card is to be displayed in the Full Screen app.

VariableReference

A variable reference to a variable in the workflow.

JSON representation
{
  "parentElementId": string,
  "nodeId": string,
  "path": string,
  "dataType": {
    object (DataType)
  },
  "iconUrl": string,
  "stepNumber": integer,
  "descriptionText": string,
  "displayText": string
}
Fields
parentElementId

string

The primitive id of the element that produces the variable We can expand this to WorkflowElement or a more detailed metadata proto if needed.

nodeId

string

Node reference id

path

string

The variable selector path signature

dataType

object (DataType)

The variable data type

iconUrl

string

The icon url of the primitive that produces this variable.

stepNumber

integer

The step number of the primitive that produces this variable.

descriptionText

string

The description of the variable.

displayText

string

The display text of the variable chip.

DataType

Type of the variable.

JSON representation
{
  "valueMetadata": {
    object (ValueMetadata)
  },

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "basicType": enum (BasicType),
  "resourceType": {
    object (ResourceType)
  }
  // End of mutually exclusive fields.
}
Fields
valueMetadata

object (ValueMetadata)

Metadata about the potential values of a variable.

The type of data. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
basicType

enum (BasicType)

Basic data type.

resourceType

object (ResourceType)

Application resource id type.

End of mutually exclusive fields.

BasicType

Basic generic data types.

Enums
BASIC_TYPE_UNSPECIFIED Default value. DO NOT USE.
STRING A string of characters.
INTEGER An integer number.
FLOAT A floating point number.
TIMESTAMP Timestamp in ISO 8601 format.
BOOLEAN A value that can be true or false.
EMAIL_ADDRESS An email address, which is a string in the format of an email address.
GOOGLE_USER User of Google services, in the format users/{user}.
FILE File reference.
FORMATTED_TEXT Text with rich formatting.

ValueMetadata

Information about the potential values of a variable.

JSON representation
{
  "enumValues": [
    string
  ],
  "dynamicTypes": [
    enum (BasicType)
  ],
  "semanticDescriptors": [
    {
      object (SemanticDescriptor)
    }
  ],
  "dynamicSchema": {
    object (DynamicSchema)
  },
  "defaultValue": string
}
Fields
enumValues[]

string

Optional. Specifies the allowed values for a string. This may only be set if DataType is STRING.

dynamicTypes[]

enum (BasicType)

Optional. Specifies the allowed types that can be dynamically casted for a variable. This may only be set if the DataType is a String and the variable is an output.

semanticDescriptors[]

object (SemanticDescriptor)

Optional. Helps describe the semantic meaning of a variable.

dynamicSchema

object (DynamicSchema)

Optional. Configuration for dynamically resolving this variable's schema.

defaultValue

string

Optional. String specifying the default value for this variable. For example, for booleans, defaultValue may be set to true or false.

SemanticDescriptor

Metadata about the semantic meaning of a variable.

JSON representation
{
  "resourceAttribute": string,
  "disallowedResourceAttributes": [
    string
  ]
}
Fields
resourceAttribute

string

Indicates that the variable corresponds to a specific attribute of a resource. This is particularly useful for variables that represent an identifier for a resource (id, url, key, etc.).

The recommended format is: - "{brand}/{appName}/{resource}:{attribute}" {brand} is optional and should be omitted if it's the same as the {appName}.

Examples: - "google/drive/file:id" - "google/drive/folder:id" - "google/docs/document:id" - "google/sheets/spreadsheet:id" - "jira/issue:key" - "slack/channel:id" etc.

The client will use this information to hint the user what output variables are compatible with a certain input.

disallowedResourceAttributes[]

string

Optional. Only applicable for inputs, and ignored for outputs. Disallowed attributes that correspond to this semantic descriptor. The client will explicitly prevent variable selection for outputs that correspond to any of these disallowed resource attributes.

DynamicSchema

Configuration for dynamically resolving this variable's schema at runtime.

JSON representation
{
  "requiredInputIds": [
    string
  ],
  "strictEnum": boolean
}
Fields
requiredInputIds[]

string

IDs of sibling input variables that must be provided before this variable's schema can be dynamically resolved.

strictEnum

boolean

When true, the variable's value must match one of the dynamically resolved enum values. When false, dynamically resolved values are treated as non-strict suggestions.

ResourceFieldsDefinitionRetrieval

Retrieves definition of fields supported by a resource.

JSON representation
{
  "elementId": string,
  "inputs": {
    string: {
      object (VariableData)
    },
    ...
  }
}
Fields
elementId

string

Specifies the ID of the element whose dynamic resource schema to fetch.

inputs

map (key: string, value: object (VariableData))

This comprises of field inputs of the node that provides the variable. Map of the input variables keyed by input variable name.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

ElementUiAutocomplete

Autocomplete suggestions for the currently rendered card.

JSON representation
{
  "query": string,
  "inputs": {
    string: {
      object (VariableData)
    },
    ...
  },
  "invokedFunction": string,
  "resourceId": string,
  "operationId": string
}
Fields
query

string

The query to autocomplete.

inputs

map (key: string, value: object (VariableData))

Map of the input variables keyed by input variable name.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

invokedFunction

string

The invoked function associated with the widget.

resourceId

string

The resource ID that should be autocompleted for. This is an optional field and may not be set.

operationId

string

The ID of the operation that provided the resource to be autocompleted. This is an optional field and may not be set.

ExecutionMetadata

Metadata about the workflow execution.

JSON representation
{
  "versionId": integer,
  "timeZone": string,
  "stepNumber": integer
}
Fields
versionId

integer

The version of the workflow element being invoked.

timeZone

string

The time zone of the workflow being saved. e.g. "America/Los_Angeles".

stepNumber

integer

Represents the step number of the primitive being invoked.

TriggerEventSource

Source of the trigger event that triggered this execution.

Enums
TRIGGER_EVENT_SOURCE_UNSPECIFIED Default value. DO NOT USE.
TRIGGER_EVENT_SOURCE_AUTOMATED Execution is triggered automatically by events.
TRIGGER_EVENT_SOURCE_TEST_RUN Execution is triggered via test run.