外掛程式類型
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本頁提供兩種外掛程式的一般總覽:Google Workspace 外掛程式和編輯器外掛程式。這些外掛程式類型擴充的應用程式、建立方式和限制各不相同。
Google Workspace 外掛程式
Google Workspace 外掛程式是最新一代的外掛程式,提供許多功能,包括:
為多個 Google Workspace 應用程式建立一個外掛程式:不必為每個 Google Workspace 應用程式分別建立外掛程式,只要建立及管理一個 Google Workspace 外掛程式,就能在所有 Google Workspace 應用程式中使用。Google Workspace 外掛程式可擴充下列主機應用程式:
- Gmail
- Google 日曆
- Google Chat (開發人員預覽版)
- Google 文件
- Google 雲端硬碟
- Google Meet
- Google 試算表
- Google 簡報
提升品牌知名度:外掛程式圖示預設會顯示在外掛程式主機應用程式的右側面板中。
打造首頁體驗:您可以為外掛程式擴充的每個 Google Workspace 應用程式建立個別首頁,也可以為多個應用程式使用同一個首頁。
在外掛程式中反映使用者的情境:您可以設計 Google Workspace 外掛程式,顯示外掛程式主機應用程式專用的介面。舉例來說,外掛程式可以顯示電子郵件或日曆活動中的資訊,或根據目前的 Google Workspace 應用程式頁面建議動作。
使用標準化介面:透過 Apps Script Card
服務提供的內建小工具元素,建構使用者介面。您不需要具備 HTML 或 CSS 專業知識,就能定義這些介面。
擴充 Gmail 的電腦版和行動版用戶端:如果 Google Workspace 外掛程式擴充了 Gmail,您可以在電腦版和行動版 Gmail 中使用該外掛程式。如果您開發的 Google Workspace 外掛程式可擴充 Gmail 功能,就不必設計外掛程式的獨立行動版。所有裝置都使用相同的介面。
使用偏好的執行階段。您可以透過偏好的代管基礎架構、開發工具鍊、來源控制系統、程式設計語言和程式碼程式庫,開發 Google Workspace 外掛程式。
編輯器外掛程式
編輯器外掛程式可擴充 Google 編輯器應用程式的功能,例如文件、試算表、簡報或表單。每種編輯器外掛程式類型 (例如 Google 試算表外掛程式) 都有一組專屬的功能、限制和特殊考量。建構編輯器外掛程式時,請務必瞭解這些編輯器專屬詳細資料。如要進一步瞭解特定編輯器的外掛程式,請參閱對應章節:
編輯器外掛程式可自動執行常見的編輯器工作,例如建立、編輯、格式化檔案,以及在應用程式之間移動資料。編輯器外掛程式介面可高度自訂,以因應手邊的工作。
編輯器外掛程式非常適合在 Google 文件、試算表、簡報或表單中自動執行工作,供個人或內部使用。如果外掛程式需要處理大量使用者、延遲時間短,或需要全面控管基礎架構,建議您在其他執行階段環境中建構 Google Workspace 外掛程式,以便更妥善地控管基礎架構、部署及發布程序。
編輯器外掛程式與 Google Workspace 外掛程式的行為不同,差異如下:
- 編輯器外掛程式可以建立包含選單項目、對話方塊和側欄的介面。外掛程式對話方塊和側欄是使用標準 HTML 和 CSS 定義。
- 編輯器外掛程式有特殊的授權規則,因為這類外掛程式會建立、修改或以其他方式與 Google 雲端硬碟中的檔案互動。開發編輯器外掛程式時,請務必瞭解編輯器外掛程式授權。
- 在每個編輯器中建立及更新的檔案都有特定結構。舉例來說,Google 簡報是由多個頁面組成,這些頁面可以是投影片、母片或版面配置。您應瞭解這些檔案結構,因為外掛程式在讀取或編輯檔案時,經常會與這些結構互動。
- 編輯器外掛程式僅適用於電腦版用戶端,不適用於 Android 或 iOS。
- 編輯器外掛程式必須以 Apps Script 實作。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-26 (世界標準時間)。
[null,null,["上次更新時間:2025-08-26 (世界標準時間)。"],[[["\u003cp\u003eGoogle Workspace add-ons offer a unified solution, extending functionalities across multiple Google Workspace applications like Gmail, Calendar, and Docs with a single add-on.\u003c/p\u003e\n"],["\u003cp\u003eEditor add-ons focus on enhancing specific Google Editors (Docs, Sheets, Slides, Forms) with custom interfaces and automation capabilities but are limited to desktop use.\u003c/p\u003e\n"],["\u003cp\u003eWhile Workspace add-ons utilize standardized interfaces and work seamlessly across platforms, Editor add-ons require HTML/CSS knowledge and adhere to specific authorization rules.\u003c/p\u003e\n"],["\u003cp\u003eBoth add-on types provide distinct advantages; Workspace add-ons enhance cross-application workflows, while Editor add-ons offer deep, editor-specific customization and task automation.\u003c/p\u003e\n"]]],["There are two add-on types: Google Workspace and Editor add-ons. Google Workspace add-ons offer a single build for multiple apps (Gmail, Calendar, Chat, Docs, Drive, Sheets, Slides), and they feature standardized interfaces, mobile and desktop compatibility, and customizable homepages. Editor add-ons extend Docs, Sheets, Slides, and Forms, allowing for highly customizable interfaces using HTML and CSS, but require specific authorization and only function on desktop. They are built to automate common editor tasks.\n"],null,["This page provides a general overview of the two types of add-ons\nyou can build:\n*Google Workspace add-ons* and *Editor add-ons*. These\nadd-on types differ in what applications they extend,\nhow they are created, and what restrictions they have.\n\nGoogle Workspace add-ons\n\n*Google Workspace add-ons* are the latest generation of add-ons, and\nprovide many capabilities, including:\n\n- **Build just one add-on for multiple\n Google Workspace apps**: Instead of creating separate\n add-ons for\n each Google Workspace application, you can build and manage a single\n Google Workspace add-on that works across Google Workspace.\n A Google Workspace add-on can extend the following host applications:\n\n - Gmail\n - Google Calendar\n - Google Chat (Developer Preview)\n - Google Docs\n - Google Drive\n - Google Meet\n - Google Sheets\n - Google Slides\n- **Increase your brand awareness**: Add-ons icons are by\n default visible in the right-side panel of the\n add-on's host apps.\n\n- **Build homepage experiences** : You can create individual [homepages](/workspace/add-ons/concepts/homepages)\n for each Google Workspace app your add-on\n extends, or use the same homepage for multiple apps.\n\n- **Reflect the user's context in your add-on**: You\n can design your Google Workspace add-on to show interfaces specific to the\n add-on's host app. For example, your\n add-on can display info from an email or calendar\n event, or suggest an action based on the current Google Workspace app\n page.\n\n- **Use standardized interfaces** : Construct user interfaces from built-in\n widget elements provided by the Apps Script\n [`Card`](/apps-script/reference/card-service/card) service. You don't need\n any expertise with HTML or CSS to define these interfaces.\n\n- **Extend desktop and mobile clients for Gmail**: If a\n Google Workspace add-on extends Gmail, you can use it in both the\n desktop and mobile versions of Gmail. If you build a\n Google Workspace add-on that extends Gmail, you don't need to\n design a separate mobile version of the add-on. The\n same interface is used everywhere.\n\n- **Use your preferred runtime.** You can develop Google Workspace add-ons with your\n preferred hosting infrastructure, development tool chain, source control\n system, coding language, and code libraries.\n\nEditor add-ons\n\n*Editor add-ons* extend one of the Google Editor applications,\nsuch as Docs, Sheets, Slides, or\nForms. Each Editor add-on type (for\nexample, Sheets add-ons) can have its own set of\ntype-specific capabilities, restrictions, and special considerations. When\nbuilding Editor add-ons, it's important to understand these\nEditor-specific details. For more details on add-ons for specific\nEditors, see the corresponding sections:\n\n- [Google Docs](/workspace/add-ons/editors/docs)\n- [Google Forms](/workspace/add-ons/editors/forms)\n- [Google Sheets](/workspace/add-ons/editors/sheets)\n- [Google Slides](/workspace/add-ons/editors/slides)\n\nEditor add-ons can automate common editor tasks such as file\ncreation, editing, formatting, and moving data between applications.\nEditor add-on interfaces are highly-customizable for\nthe tasks at hand.\n\nEditor add-ons are ideal for automating tasks within Google\nDocs, Sheets, Slides, or\nForms for individual or internal use. For add-ons\nrequiring large-scale capabilities that need to handle many users, require low\nlatency, or demands full control over your infrastructure, consider building a\nGoogle Workspace add-ons on a [different runtime](/workspace/add-ons/guides/alternate-runtimes)\nenvironment for better control over infrastructure, deployment and release\nprocesses.\n\nEditor add-ons behave differently from Google Workspace add-ons in the\nfollowing ways:\n\n- Editor add-ons can create interfaces consisting of menu items, dialogs, and sidebars. Add-ons dialogs and sidebars are defined using standard [HTML and\n CSS](/workspace/add-ons/concepts/html-interfaces).\n- Editor add-ons have special authorization rules because they create, modify, or otherwise interact with files within Google Drive. It is important to understand the [Editor add-on\n authorization](/workspace/add-ons/concepts/editor-auth-lifecycle) while developing an Editor add-on.\n- Files created and updated in each editor have specific structures. For example, Google Slides presentations are composed of pages which can be slides, masters, or layouts. You should understand these file structures, as add-ons often interact with them when reading or editing files.\n- Editor add-ons only function in desktop clients, not Android or iOS.\n- Editor add-ons must be implemented in Apps Script."]]