Google Workspace 外掛程式擴充的 Google Workspace 應用程式,例如 Gmail 或 Google 日曆。
以 HTML 為基礎
使用 HTML 和 CSS 定義使用者介面,而非使用 Apps Script 內建的卡片服務。只有較舊的編輯器外掛程式是基於 HTML。
連結預覽觸發條件
當使用者在 Google 主機應用程式 (例如 Google 文件) 中與第三方或非 Google 網址互動時,連結預覽功能就會觸發。連結預覽觸發事件可讓您定義網址模式,以便從服務或 API 預覽,並設定預覽內容,包括智慧方塊和預覽資訊卡。連結預覽觸發事件是在外掛程式專案的資訊清單中設定,因此屬於一種資訊清單觸發事件。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-12-18 (世界標準時間)。"],[[["\u003cp\u003eThis documentation provides definitions for common terms used in Google Workspace add-on development.\u003c/p\u003e\n"],["\u003cp\u003eUnderstanding these terms is essential for navigating the documentation and creating effective add-ons.\u003c/p\u003e\n"],["\u003cp\u003eThe glossary covers concepts like add-on types, UI elements, triggers, and the interaction between client-side and server-side code.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can find links to more detailed information within each definition to further expand their understanding.\u003c/p\u003e\n"]]],["This document defines terms related to Google Workspace add-ons. Key concepts include: **Calendar conferencing add-ons** (for third-party conferencing), **cards** (UI pages), **card-based** add-ons, **conference data/solutions**, **context** (host app state), **contextual triggering**, **editor add-ons**, **event objects** (data passed to the server), **Gmail add-ons**, **homepages**, **manifest** (project configuration), **manifest triggers**, **sidebar**, **smart chip**, **trigger** (event response), **trigger function**, **widget** (UI element), and **widget handler functions**.\n"],null,["The following terms are used throughout this documentation.\n\nCalendar conferencing add-on\n\nA special kind of add-on used to allow conferencing providers to present\nconferencing options in Google Calendar events. These add-ons require\na well-developed conferencing solution for the add-on to connect to.\nBecause of this requirement, most developers never have\na need to create a Calendar conferencing add-on.\n\nSee [Calendar conferencing add-ons](/workspace/add-ons/concepts/types#calendar_conferencing_add-ons)\nfor more information. Also see\n[Upgrading your published add-ons](/workspace/add-ons/how-tos/upgrade-addons)\nfor information on how to convert a Calendar conferencing add-on into a\nGoogle Workspace add-on.\n\nCard\n\nA single \"page\" of an add-on UI. Cards are composed of different widget objects\n(buttons, text fields, headers, and so forth).\n\nSee [Cards](/workspace/add-ons/concepts/cards) for more information.\n\nCard-based\n\nAn add-on whose user interface appears as a pane in the sidebar (or, on mobile,\nas another activity window reached through the menu). The add-on has a top\ntoolbar that identifies the add-on and displays a card---essentially a \"page\"\nof the add-on's UI.\n\nGoogle Workspace add-ons are card-based.\n\nConference data\n\nThe set of information Google Calendar needs in order to let users create and\njoin third-party conferences enabled by a\nGoogle Workspace add-on or Calendar\nconferencing add-on.\n\nSee [Conference data](/workspace/add-ons/calendar/conferencing/overview#conference_data)\nfor more information.\n\nConference solution\n\nA representation of a third-party conference that can be created from\nGoogle Calendar using Google Workspace add-on or\nCalendar conferencing add-on.\n\nSee [Conference solutions](/workspace/add-ons/calendar/conferencing/overview#conference_solutions)\nfor more information.\n\nContext\n\nThe current state of the host application. For example, which message currently\nopen in Gmail, which Calendar event you are editing, or which Drive files you\nhave selected are part of the host application's current context. Context,\nalong with other information, is collected into an event object that is passed\nto the trigger function as a parameter.\n\nContextual triggering\n\nThe practice of defining triggers that fire when the user enters a specific\ncontext, such as when they open an email thread in Gmail. Contextual triggering\nlets your add-on to provide a UI that is relevant to that context. Contextual\ntriggers are configured in the add-on script project's\n[manifest](/workspace/add-ons/concepts/workspace-manifests) and thus are a\ntype of\n*manifest trigger*.\n\nEditor add-ons\n\nThe original set of add-ons types that only allowed extensions of Google Docs,\nSheets, Forms, or Slides. Editor add-ons are not card-based; rather, they\nrequired the developer to create a UI from raw HTML and CSS. Each editor add-on\ncan only extend one host application.\n\nSee [Editor add-ons](/workspace/add-ons/concepts/types#editor_add-ons) for more\ndetails.\n\nEvent object\n\nThe JSON object that is automatically created when homepages are requested,\nwhen the add-on enters contexts it needs to respond to, or as the result of\nuser interactions with widgets in the add-on interface. Once created,\nevent objects are passed to a specified trigger function or\ncallback function. The purpose of event objects is to pass information from\nthe user's client-side environment (such as information they've entered into\nthe add-on interface widgets) to the add-on's server-side code, which then\ncan act on that information and return the appropriate response.\n\nSee [Event objects](/workspace/add-ons/concepts/event-objects) for more\ndetails.\n\nGmail add-ons\n\nAn add-on that extends Gmail only. Gmail add-ons are card-based. Much of the\nfunctionality, behavior, and development details used to create Gmail add-ons\nis identical to same details used to create\nGoogle Workspace add-ons.\n\nSee [Gmail add-ons](/workspace/add-ons/concepts/types#gmail_add-ons) for more\ninformation. Also see\n[Upgrading your published add-ons](/workspace/add-ons/how-tos/upgrade-addons)\nfor information on how to convert a Gmail add-on into a\nGoogle Workspace add-on.\n\nHomepage\n\nThe root UI card of an add-on. Homepages are displayed when users open the\nadd-on, and let your add-on to show content outside of a specific context\n(for example, when the user is viewing their email threads in Gmail, but hasn't\nopened one). You define the appearance and behavior of your add-on homepage\nlike any other card.\n\nSee [Homepages](/workspace/add-ons/concepts/homepages) for more information.\n\nHost or Host application\n\nThe Google Workspace application a\nGoogle Workspace add-on\nextends, such as Gmail or Google Calendar.\n\nHTML-based\n\nAn add-on whose user interface is defined using HTML and CSS instead of the\nApps Script built-in [Card service](/apps-script/reference/card-service/card-service).\nOnly older [Editor add-ons](/workspace/add-ons/concepts/types#editor_add-ons)\nare HTML-based.\n\nLink preview trigger\n\nLink preview triggers fire when users interact with a third-party or non-Google\nURL within a Google host application, such as Google Docs. Link preview\ntriggering lets you define URL patterns to preview from your service or API, and\nconfigure the preview content, including the smart chip and preview card. Link\npreview triggers are configured in the add-on script\nproject's manifest and thus are a type of manifest trigger.\n\nSee\n[Preview links with smart chips](/workspace/add-ons/editors/gsao/preview-links)\nfor more information.\n\nManifest\n\nA JSON file attached to an Apps Script project. The manifest is used to define\nproject information the script needs to run correctly. For\nGoogle Workspace add-ons, the\nmanifest is used to specify what hosts the add-on can extend and provide\ncertain UI control settings.\n\nManifest trigger\n\nA trigger that is defined in a project's manifest, such as a homepage\ntrigger or contextual trigger. Manifest triggers are used exclusively to\ncreate and display new cards when an add-on homepage is requested or the add-on\nenters a context that requires a display update.\n\nManifest triggers are distinct from other triggers in Apps Script because they\naren't built-in (like\n[simple triggers](/apps-script/guides/triggers)) and can't be be created\nprogrammatically with the Apps Script\n[Script service](/apps-script/reference/script) (like\n[installable triggers](/apps-script/guides/triggers/installable)).\n\nNon-contextual cards\n\nCards that show content when the user is outside a specific context; for\nexample, when viewing their email threads in Gmail, but hasn't opened a one.\nHomepages are a kind of non-contextual card.\n\nSidebar\n\nThe section on the right of the host UI where a\nGoogle Workspace add-on's UI appears.\nGmail and Editor add-ons can also define sidebars.\n\nSmart chip\n\nA smart chip is a mention of a person, file, calendar event, or other entity\nwithin a Google Workspace application. When users hover over a chip, they can also\npreview additional content about the file or link. For example, when users hover\nover a chip to a Google Slides presentation, they see a screenshot of a slide,\nthe owner of the presentation, and whether they've viewed the presentation\nbefore.\n\nYou can configure your add-on to use smart chips to preview links for a\nthird-party or non-Google service. See\n[Preview links in Google Docs](/workspace/add-ons/editors/gsao/preview-links).\n\nTrigger\n\nA condition and automatic event response defined by an Apps Script project or\nadd-on. Triggers fire when their associated event occurs (for example, when an\nadd-on is opened) and cause a specified Apps Script function (the trigger\nfunction) to execute automatically. For\nGoogle Workspace add-ons, trigger functions often\nbuild new Cards in order to control what part of the add-on UI is displayed.\nOnly certain event types can have triggers.\n\nSee [add-on triggers](/workspace/add-ons/concepts/workspace-triggers) for more\ninformation.\n\nTrigger function\n\nAn Apps Script function in a project that executes in response to a trigger\nbeing fired.\n\nWidget\n\nA UI element such as a button, text field, or checkbox. Cards are constructed\nfrom a sequence of widget objects, defined by the Apps Script built-in\n[Card service](/apps-script/reference/card-service/card-service).\n\nSee [Widgets](/workspace/add-ons/concepts/widgets) for more information.\n\nWidget handler function\n\nA function that links a particular [widget](/workspace/add-ons/concepts/widgets)\nto a particular [action object](/workspace/add-ons/concepts/actions). Each widget\ntype has a set of defined widget handler functions it can use to connect to\nactions. Widget hander functions define what kind of user interaction triggers\nthe resulting action, and are a crucial component of widget interactivity.\n\nSee [Widget handler functions](/workspace/add-ons/concepts/actions#widget_handler_functions)\nfor more information."]]