For a SelectionInput
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 |
---|---|---|
setChatDataSource(chatClientDataSource) | HostAppDataSource | 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 |
---|---|---|
chatClientDataSource | ChatClientDataSource | The data source to be set. |
Return
HostAppDataSource
— This object, for chaining.