雲端硬碟資訊清單資源
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
用於定義 Google 雲端硬碟中 Google Workspace 外掛程式內容和行為的資源設定。如果 Google Workspace 外掛程式資訊清單會擴充 Google 雲端硬碟,則必須包含所有標示為「必要」的元件。
雲端硬碟
Google 雲端硬碟擴充功能的 Google Workspace 外掛程式資訊清單設定。詳情請參閱「使用 Google Workspace 外掛程式擴充雲端硬碟功能」。
OnItemsSelectedTrigger
當使用者在 Google 雲端硬碟中選取一或多個檔案或資料夾時,系統會觸發內容相關觸發條件的設定。詳情請參閱「為所選項目提供 Google 雲端硬碟情境介面」。
JSON 表示法 |
{
"runFunction": string
} |
欄位 |
runFunction |
string
在 Google 雲端硬碟中選取檔案或資料夾時要執行的函式名稱。如果指定,您必須實作這個函式,才能建構並傳回 Card 物件的陣列,以便在外掛程式 UI 中顯示。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-31 (世界標準時間)。
[null,null,["上次更新時間: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. |"]]