云端硬盘清单资源
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
用于定义 Google 云端硬盘中的 Google Workspace 插件内容和行为的资源配置。
如果 Google Workspace 加购服务清单扩展了云端硬盘,则必须包含所有标记为必需的组件。
云端硬盘
Google 云端硬盘扩展服务的 Google Workspace 插件清单配置。如需了解详情,请参阅使用 Google Workspace 加购项扩展云端硬盘。
OnItemsSelectedTrigger
一种上下文触发器的配置,当用户在 Google 云端硬盘中选择一个或多个文件或文件夹时,该触发器会触发。如需了解详情,请参阅为所选内容提供 Drive 上下文界面。
JSON 表示法 |
{
"runFunction": string
} |
字段 |
runFunction |
string
在 Google 云端硬盘中选择文件或文件夹时要运行的函数的名称。如果指定了此函数,您必须实现此函数,以构建并返回一个 Card 对象数组,以便在插件界面中显示。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eGoogle Workspace Add-on manifests extending Drive must include all required components.\u003c/p\u003e\n"],["\u003cp\u003eDrive extensions utilize a manifest configuration for defining add-on content and behavior within Google Drive.\u003c/p\u003e\n"],["\u003cp\u003eAn \u003ccode\u003eonItemsSelectedTrigger\u003c/code\u003e is required in the manifest to enable add-on functionality when users select Drive items.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eonItemsSelectedTrigger\u003c/code\u003e specifies a function that builds and returns Card objects for the add-on UI.\u003c/p\u003e\n"]]],[],null,["# Drive manifest resource\n\nThe resource configuration that is used to define\n[Google Workspace add-on](/workspace/add-ons/concepts/types#g_suite_add-ons)\ncontent and behavior within Google Drive.\nGoogle Workspace add-on manifests must have\nall the components marked as **Required** if they extend Drive.\n\nDrive\n-----\n\nThe Google Workspace add-on manifest configuration for\nGoogle Drive extensions. See\n[Extending Drive with Google Workspace add-ons](/workspace/add-ons/drive)\nfor more information.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------|\n| ```text { \"homepageTrigger\": { object (HomepageTrigger) }, \"onItemsSelectedTrigger\": { object (OnItemsSelectedTrigger) } } ``` |\n\n| Fields ||\n|--------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `homepageTrigger` | `object (`[HomepageTrigger](/apps-script/manifest/homepage-trigger)`)` The trigger function specification for creating the add-on [homepage](/workspace/add-ons/concepts/homepages) in the Drive host. This overrides [`addOns.common.homepageTrigger`](/apps-script/manifest/addons#Common.FIELDS.homepageTrigger). |\n| `onItemsSelectedTrigger` | `object (`[OnItemsSelectedTrigger](#onitemsselectedtrigger)`)` **Required to provide add-on behavior triggered by user selection of items in Drive.** The contextual trigger function specification for item selections in Google Drive. |\n\n### OnItemsSelectedTrigger\n\nA configuration for a contextual trigger that fires when a user selects\none or more files or folders in Google Drive. See\n[Drive contextual interface for items selected](/workspace/add-ons/drive/building-drive-interfaces#drive_contextual_interface_for_items_selected)\nfor more information.\n\n| JSON representation |\n|---------------------------------------|\n| ```text { \"runFunction\": string } ``` |\n\n| Fields ||\n|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `runFunction` | `string` The name of the function to run when files or folders are selected in Google Drive. If specified, you must implement this function to build and return an array of [`Card`](/apps-script/reference/card-service/card) objects for display in the add-on UI. |"]]