違規內容
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
外掛程式可執行的功能受到一些限制。請避免這些陷阱,提升使用者的整體體驗。
一般限制
以下限制適用於所有外掛程式。請勿執行下列操作:
變更 Google Workspace 中的功能
外掛程式架構旨在強化 Google Workspace 應用程式,而非增加限制。因此,您無法變更現有功能或鎖定 Google Workspace 文件共用模式。
向使用者收取安裝費用
我們不會向使用者收取安裝外掛程式的費用,且外掛程式不得包含廣告。不過,您可以使用自己的付款系統,或呼叫現有的帳單資料庫。外掛程式可以連結向使用者收費的非 Google 服務。
偵測多個事件
除了特定觸發事件外,外掛程式無法得知使用者在外掛程式之外的行為。舉例來說,您無法偵測使用者點選主機應用程式工具列的時間。您可以透過側欄的用戶端程式碼,輪詢檔案內容是否有變更,但這會造成輕微延遲。
Google Workspace 外掛程式
下列限制僅適用於 Google Workspace 外掛程式和卡片服務的使用情形。請勿執行下列操作:
擴充所有 Google Workspace 應用程式
Google Workspace 外掛程式只能擴充 Gmail、日曆、雲端硬碟、Meet、文件、試算表和簡報。日後 Google Workspace 外掛程式將可擴充其他 Google Workspace 應用程式。
編輯器中的文件內容
Google Workspace 外掛程式尚不支援在編輯器中使用文件內容。也就是說,您無法使用 SpreadsheetApp.getActiveSpreadsheet()
等方法取得目前的文件。
使用 HTML/CSS 或用戶端指令碼
Google Workspace 外掛程式必須使用以卡片為基礎的介面。無法使用編輯器外掛程式支援的 HTML/CSS 介面。Google Workspace 外掛程式會使用以小工具為基礎的方法建構使用者介面。這樣一來,外掛程式就能在電腦和行動平台上正常運作,而您也不必為每個平台建立介面。
完整的行動裝置支援
目前,Google Workspace 外掛程式可在電腦網頁用戶端上運作。Gmail 行動應用程式也支援情境觸發功能 (也就是 Gmail 訊息閱讀功能)。Gmail、日曆或雲端硬碟行動應用程式目前尚未提供非情境首頁。Google Workspace 外掛程式無法在行動網頁瀏覽器中使用。
使用 Apps Script 觸發條件
您無法在 Google Workspace 外掛程式中建立或使用 Apps Script 簡易觸發條件。
使用可擴充向量圖形圖片
目前無法在資訊卡服務資訊卡和小工具中使用 SVG 圖片。
基於效能考量,您無法在資訊卡中加入超過 100 個小工具或 100 個資訊卡版面。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-01-30 (世界標準時間)。
[null,null,["上次更新時間:2025-01-30 (世界標準時間)。"],[[["\u003cp\u003eGoogle Workspace add-ons enhance, but do not fundamentally change, existing Google Workspace features.\u003c/p\u003e\n"],["\u003cp\u003eAdd-ons cannot directly charge users for installation or include ads but can integrate with external billing systems.\u003c/p\u003e\n"],["\u003cp\u003eAdd-on functionality is limited in terms of event detection and contextual triggering within certain Google Workspace apps.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Workspace add-ons use a card-based interface system, rather than traditional HTML, CSS, or client-side scripting.\u003c/p\u003e\n"],["\u003cp\u003eWhile add-ons are largely desktop-focused, some contextual triggering is supported within the Gmail mobile app.\u003c/p\u003e\n"]]],["Add-ons are restricted from altering Google Workspace features, charging users for installation, or detecting user actions outside the add-on. Google Workspace add-ons are limited to Gmail, Calendar, Drive, Meet, Docs, Sheets, and Slides, and must use card-based interfaces, not HTML/CSS. They cannot access document context in editors or utilize Apps Script triggers. Additionally, SVG images and exceeding 100 widgets per card are prohibited. Full mobile support is also unavailable, and only desktop web clients are supported.\n"],null,["# Restrictions\n\nThere are a few restrictions on what add-ons can do. Improve your users'\noverall experience by avoiding these pitfalls.\n\nGeneral restrictions\n--------------------\n\nThe following restrictions apply to all add-ons. Don't do the following:\n\n### Change features in Google Workspace\n\nThe add-ons framework is designed to enhance\nGoogle Workspace applications---not to\nadd limits. Consequently, you can't alter existing features or lock down the\nGoogle Workspace document sharing model.\n\n### Charge users to install\n\nWe don't provide a way to charge users for installing add-ons, and add-ons\n[can't include ads](/apps-script/terms). However, you can roll your own payment\nsystem or call into an existing billing database. Your add-on can connect to\nnon-Google services that bill users.\n\n### Detect many events\n\nExcept for [certain triggers](/workspace/add-ons/concepts/triggers), add-ons can't\ntell what a user does outside the add-on itself. For example, you can't detect\nwhen the user clicks on the host application toolbar. It is possible to poll for\nchanges in a file's contents from a sidebar's client-side code, although\nyou'll always have a slight delay.\n\nGoogle Workspace add-ons\n------------------------\n\nThe following restrictions only apply to\nGoogle Workspace add-ons and the use of the\n[Card service](/apps-script/reference/card-service/card-service). Don't do the following:\n\n### Extend all Google Workspace apps\n\nGoogle Workspace add-ons can only extend Gmail,\nCalendar, Drive, Meet, Docs, Sheets, and Slides. Eventually Google Workspace add-ons will be able to extend other Google Workspace\napplications.\n\n### Document context in editors\n\nGoogle Workspace add-ons don't yet support the use of\ndocument context in editors. That is, you can't use methods such as\n[`SpreadsheetApp.getActiveSpreadsheet()`](/apps-script/reference/spreadsheet/spreadsheet-app#getactivespreadsheet)\nto acquire the current document.\n\n### Use HTML/CSS or client-side scripting\n\nGoogle Workspace add-ons must use card-based\ninterfaces. The HTML/CSS interfaces supported by Editor add-ons can't be used.\nGoogle Workspace add-ons use a\n[widget-based](/workspace/add-ons/concepts/widgets) approach to building user\ninterfaces. This lets the add-on work well on desktop and mobile platforms\nwithout requiring you to build an interface for each.\n\n### Full mobile support\n\nFor the time being, Google Workspace add-ons function\non desktop web clients. Contextual triggering (that is, Gmail message reading)\nis also supported from within the Gmail mobile app. Non-contextual homepages\nare not yet available from the Gmail, Calendar, or Drive mobile apps.\nGoogle Workspace add-ons are not\navailable from mobile web browsers.\n\n### Use Apps Script triggers\n\nYou can't create or use Apps Script\n[simple triggers](/apps-script/guides/triggers) in a\nGoogle Workspace add-on.\n\n### Use SVG Images\n\nYou can't currently use SVG images with\n[Card service](/apps-script/reference/card-service/card-service) cards and widgets.\n\n### Have more than 100 widgets\n\nFor performance reasons, you can't add more than 100 widgets or 100 card\nsections to a card."]]