Đối với tiện ích Selection sử dụng một trình đơn chọn nhiều, nguồn dữ liệu từ một ứng dụng Google Workspace. Nguồn dữ liệu sẽ điền các mục lựa chọn cho trình đơn chọn nhiều.
const chatSpaceDataSource = CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true); const chatClientDataSource = CardService.newChatClientDataSource().setSpaceDataSource( chatSpaceDataSource); const hostAppDataSource = CardService.newHostAppDataSource().setChatDataSource(chatClientDataSource);
Chỉ dành cho các ứng dụng Google Chat và tiện ích bổ sung Google Workspace mở rộng quy trình. Không dùng được cho các tiện ích bổ sung khác của Google Workspace.
Phương thức
| Phương thức | Kiểu dữ liệu trả về | Mô tả ngắn |
|---|---|---|
set | Host | Đặt nguồn dữ liệu từ Google Chat. |
set | Host | Đặt nguồn dữ liệu từ Google Workspace Flows. |
Tài liệu chi tiết
set Chat Data Source(chatClientDataSource)
Đặt nguồn dữ liệu từ Google Chat.
const chatSpaceDataSource = CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true); const chatClientDataSource = CardService.newChatClientDataSource().setSpaceDataSource( chatSpaceDataSource); const hostAppDataSource = CardService.newHostAppDataSource().setChatDataSource(chatClientDataSource);
Thông số
| Tên | Loại | Mô tả |
|---|---|---|
chat | Chat | Nguồn dữ liệu cần thiết lập. |
Cầu thủ trả bóng
Host – Đối tượng này, để liên kết.
set Workflow Data Source(workflowDataSource)
Đặt nguồn dữ liệu từ Google Workspace Flows.
Chỉ có trong chương trình Gemini Alpha cho các tiện ích bổ sung Google Workspace mở rộng Google Workspace Flows.
const workflowDataSource = CardService.newWorkflowDataSource().setIncludeVariables(true); const hostAppDataSource = CardService.newHostAppDataSource().setWorkflowDataSource(workflowDataSource);
Thông số
| Tên | Loại | Mô tả |
|---|---|---|
workflow | Workflow | Nguồn dữ liệu cần thiết lập. |
Cầu thủ trả bóng
Host – Đối tượng này, để liên kết.