- [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#SCHEMA_REPRESENTATION)
- [OpenLink](https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#OpenLink)
  - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#OpenLink.SCHEMA_REPRESENTATION)
- [OpenAs](https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#OpenAs)
- [OnClose](https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#OnClose)
- [OverflowMenu](https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#OverflowMenu)
  - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#OverflowMenu.SCHEMA_REPRESENTATION)
- [OverflowMenuItem](https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#OverflowMenuItem)
  - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#OverflowMenuItem.SCHEMA_REPRESENTATION)

Represents how to respond when users click an interactive element on a card, such as a button.

![](https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg) ![](https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg) Available for Google Chat apps and Google Workspace add-ons.

| JSON representation |
|---|
| ``` { "action": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/Action`) }, "openLink": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#OpenLink`) }, "openDynamicLinkAction": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/Action`) }, "card": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/Card`) }, "overflowMenu": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#OverflowMenu`) } } ``` |

| Fields ||
|---|---|
| The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `action` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/Action`)`` If specified, an action is triggered by this `onClick`. |
| `openLink` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#OpenLink`)`` If specified, this `onClick` triggers an open link action. |
| `openDynamicLinkAction` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/Action`)`` An add-on triggers this action when the action needs to open a link. This differs from the `openLink` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back. ![](https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg) Available for Google Workspace add-ons and unavailable for Google Chat apps. |
| `card` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/Card`)`` A new card is pushed to the card stack after clicking if specified. ![](https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg) Available for Google Workspace add-ons and unavailable for Google Chat apps. |
| `overflowMenu` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#OverflowMenu`)`` If specified, this `onClick` opens an overflow menu. |
| End of mutually exclusive fields. ||

## OpenLink

Represents an `onClick` event that opens a hyperlink.

![](https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg) ![](https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg) Available for Google Chat apps and Google Workspace add-ons.

| JSON representation |
|---|
| ``` { "url": string, "openAs": enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#OpenAs`), "onClose": enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#OnClose`) } ``` |

| Fields ||
|---|---|
| `url` | `string` The URL to open. HTTP URLs are converted to HTTPS. |
| `openAs` | ``enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#OpenAs`)`` How to open a link. ![](https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg) Available for Google Workspace add-ons and unavailable for Google Chat apps. |
| `onClose` | ``enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#OnClose`)`` Whether the client forgets about a link after opening it, or observes it until the window closes. ![](https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg) Available for Google Workspace add-ons and unavailable for Google Chat apps. |

## OpenAs

When an `OnClick` action opens a link, then the client can either open it as a full-size window (if that's the frame used by the client), or an overlay (such as a pop-up). The implementation depends on the client platform capabilities, and the value selected might be ignored if the client doesn't support it. `FULL_SIZE` is supported by all clients.

![](https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg) Available for Google Workspace add-ons and unavailable for Google Chat apps.

| Enums ||
|---|---|
| `FULL_SIZE` | The link opens as a full-size window (if that's the frame used by the client). |
| `OVERLAY` | The link opens as an overlay, such as a pop-up. |

## OnClose

What the client does when a link opened by an `OnClick` action is closed.

Implementation depends on client platform capabilities. For example, a web browser might open a link in a pop-up window with an `OnClose` handler.

If both `OnOpen` and `OnClose` handlers are set, and the client platform can't support both values, `OnClose` takes precedence.

![](https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg) Available for Google Workspace add-ons and unavailable for Google Chat apps.

| Enums ||
|---|---|
| `NOTHING` | Default value. The card doesn't reload; nothing happens. |
| `RELOAD` | Reloads the card after the child window closes. If used in conjunction with [`OpenAs.OVERLAY`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#openas), the child window acts as a modal dialog and the parent card is blocked until the child window closes. |

## OverflowMenu

A widget that presents a pop-up menu with one or more actions that users can invoke. For example, showing non-primary actions in a card. You can use this widget when actions don't fit in the available space. To use, specify this widget in the `OnClick` action of widgets that support it. For example, in a `Button`.

![](https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg) ![](https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg) Available for Google Chat apps and Google Workspace add-ons.

| JSON representation |
|---|
| ``` { "items": [ { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#OverflowMenuItem`) } ] } ``` |

| Fields ||
|---|---|
| `items[]` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick#OverflowMenuItem`)`` Required. The list of menu options. |

## OverflowMenuItem

An option that users can invoke in an overflow menu.

![](https://www.gstatic.com/images/branding/productlogos/chat_2023q4/v1/192px.svg) ![](https://www.gstatic.com/images/branding/productlogos/gsuite_addons/v6/192px.svg) Available for Google Chat apps and Google Workspace add-ons.

| JSON representation |
|---|
| ``` { "startIcon": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/Icon`) }, "text": string, "onClick": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick`) }, "disabled": boolean } ``` |

| Fields ||
|---|---|
| `startIcon` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/Icon`)`` The icon displayed in front of the text. |
| `text` | `string` Required. The text that identifies or describes the item to users. |
| `onClick` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/OnClick`)`` Required. The action invoked when a menu option is selected. This `OnClick` cannot contain an `OverflowMenu`, any specified `OverflowMenu` is dropped and the menu item disabled. |
| `disabled` | `boolean` Whether the menu option is disabled. Defaults to false. |