Class HostAppDataSource

HostAppDataSource

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.

constchatSpaceDataSource=CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);constchatClientDataSource=CardService.newChatClientDataSource().setSpaceDataSource(chatSpaceDataSource);consthostAppDataSource=CardService.newHostAppDataSource().setChatDataSource(chatClientDataSource);

Only available for Google Chat apps. Not available for Google Workspace add-ons.

Methods

MethodReturn typeBrief description
setChatDataSource(chatClientDataSource)HostAppDataSourceSets the data source from Google Chat.

Detailed documentation

setChatDataSource(chatClientDataSource)

Sets the data source from Google Chat.

constchatSpaceDataSource=CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);constchatClientDataSource=CardService.newChatClientDataSource().setSpaceDataSource(chatSpaceDataSource);consthostAppDataSource=CardService.newHostAppDataSource().setChatDataSource(chatClientDataSource);
Only available for Google Chat apps. Not available for Google Workspace add-ons.

Parameters

NameTypeDescription
chatClientDataSourceChatClientDataSourceThe data source to be set.

Return

HostAppDataSource — This object, for chaining.