Google Chat V1 API - Module Google::Apps::Card::V1::SelectionInput::SelectionType (v0.3.1)

Reference documentation and code samples for the Google Chat V1 API module Google::Apps::Card::V1::SelectionInput::SelectionType.

The format for the items that users can select. Different options support different types of interactions. For example, users can select multiple checkboxes, but can only select one item from a dropdown menu.

Each selection input supports one type of selection. Mixing checkboxes and switches, for example, isn't supported.

Google Workspace Add-ons and Chat apps:

Constants

CHECK_BOX

value: 0
A set of checkboxes. Users can select one or more checkboxes.

RADIO_BUTTON

value: 1
A set of radio buttons. Users can select one radio button.

SWITCH

value: 2
A set of switches. Users can turn on one or more switches.

DROPDOWN

value: 3
A dropdown menu. Users can select one item from the menu.

MULTI_SELECT

value: 4
A multiselect menu for static or dynamic data. From the menu bar, users select one or more items. Users can also input values to populate dynamic data. For example, users can start typing the name of a Google Chat space and the widget autosuggests the space.

To populate items for a multiselect menu, you can use one of the following types of data sources:

  • Static data: Items are specified as SelectionItem objects in the widget. Up to 100 items.
  • Google Workspace data: Items are populated using data from Google Workspace, such as Google Workspace users or Google Chat spaces.
  • External data: Items are populated from an external data source outside of Google Workspace.

For examples of how to implement multiselect menus, see Add a multiselect menu.

Google Workspace Add-ons and Chat apps: Multiselect for Google Workspace Add-ons are in Developer Preview.