For a Selection
widget that uses a multiselect menu, a data source from a Google
Workspace application. The data source populates selection items for the multiselect menu.
const chatSpaceDataSource = CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true); const chatClientDataSource = CardService.newChatClientDataSource().setSpaceDataSource( chatSpaceDataSource); const hostAppDataSource = CardService.newHostAppDataSource().setChatDataSource(chatClientDataSource);
Only available for Google Chat apps. Not available for Google Workspace Add-ons.
Methods
Method | Return type | Brief description |
---|---|---|
set | Host | Sets the data source from Google Chat. |
Detailed documentation
setChatDataSource(chatClientDataSource)
Sets the data source from Google Chat.
const chatSpaceDataSource = CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true); const chatClientDataSource = CardService.newChatClientDataSource().setSpaceDataSource( chatSpaceDataSource); const hostAppDataSource = CardService.newHostAppDataSource().setChatDataSource(chatClientDataSource);Only available for Google Chat apps. Not available for Google Workspace Add-ons.
Parameters
Name | Type | Description |
---|---|---|
chat | Chat | The data source to be set. |
Return
Host
— This object, for chaining.