什麼是動作?
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
使用者可透過動作直接在 Gmail 中與您的產品或服務互動。
舉例來說,當你傳送雜誌訂閱即將到期的通知時,可以直接在通知中提供續訂選項。
動作可透過兩種方式宣告:應用程式內動作或前往動作。目前支援多種動作。
應用程式內動作
應用程式內動作會在 Gmail 內處理,不會將使用者導向任何其他網站。這類動作包括單鍵操作。
單鍵動作
在許多情況下,使用者預期會確認預先定義的要求。舉例來說,使用者註冊網站時,會收到要求確認註冊的電子郵件。同樣地,電影或音樂推薦網站可能會提示使用者將項目加入佇列,以便稍後欣賞。
在 Gmail 中一鍵執行動作
詳情請參閱「一鍵動作參考資料」。
Go-To Actions
如要進行更複雜的互動,可以使用「前往動作」直接連結至可執行動作的頁面。點選按鈕後,系統會將使用者重新導向至動作定義中指定的頁面。
如果動作需要多個步驟,或是需要大量擷取無法從收件匣執行的資料,就應使用「前往動作」。舉例來說,航空公司傳送辦理登機手續提醒時,可以加入「前往動作」,讓使用者快速前往航空公司網站選位或申請升等。
Gmail 中的快速動作
詳情請參閱「前往動作參考資料」。
延伸閱讀
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-29 (世界標準時間)。
[null,null,["上次更新時間:2025-08-29 (世界標準時間)。"],[],[],null,["# What Are Actions?\n\nActions enable users to interact with your product or service right inside Gmail.\n\nFor instance, when you send a notification that a magazine subscription is about to expire, you can present the option to renew it right from the notification.\n\nActions can be declared in two ways: as In-App Actions or as Go-To Actions. Multiple types of actions are currently supported.\n\nIn-App Actions\n--------------\n\nIn-App Actions are handled in-place, inside Gmail, without sending the user to any other website. Such actions include One-Click Actions.\n\n### One-Click Action\n\nThere are many scenarios where the expected behavior from the user is to confirm a pre-defined request. For instance, when a user registers to a site, she receives an email asking her to confirm her registration. Similarly, a movie or music recommendations site could prompt a user to add items to a queue to enjoy later.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nOne-click actions in Gmail\n\n\u003cbr /\u003e\n\nTo learn more, see the [One-Click Action Reference](../reference/one-click-action).\n\nGo-To Actions\n-------------\n\nFor more complex interactions, Go-To Actions can be used to provide a direct link to the page where the action can be performed. Clicking the button redirects the user to the page specified in the action definition.\n\nGo-To Actions should be used for actions that require multiple steps, or significant data capture that can't be performed from the inbox. For instance, an airline sending a check-in reminder can add a Go-To Action to quickly take the user to the airline website to select a seat or request an upgrade.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nGo-to actions in Gmail\n\n\u003cbr /\u003e\n\nTo learn more, see the [Go-To Action Reference](../reference/go-to-action).\n\nFurther Reading\n---------------\n\n- [Declaring Actions](/workspace/gmail/markup/actions/declaring-actions)\n\n| **Note:** Some of the schemas used by Google are still going through the standardization process of [schema.org](http://schema.org), and therefore, may change in the future. [Learn More](/workspace/gmail/markup/reference/schema-org-proposals)."]]