什么是操作?
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
借助操作,用户可以直接在 Gmail 中与您的产品或服务互动。
例如,当您发送有关杂志订阅即将到期的通知时,可以直接在通知中显示续订选项。
操作可通过两种方式声明:作为应用内操作或作为前往操作。目前支持多种类型的操作。
应用内操作次数
应用内操作在 Gmail 内就地处理,无需将用户发送到任何其他网站。此类操作包括一键式操作。
一键操作
在许多情况下,用户需要确认预定义的请求。例如,当用户注册某个网站时,会收到一封电子邮件,要求其确认注册。同样,电影或音乐推荐网站可能会提示用户将内容添加到队列中,以便稍后欣赏。
Gmail 中的一键操作
如需了解详情,请参阅一键操作参考。
前往操作
对于更复杂的互动,可以使用“前往操作”直接链接到可执行相应操作的页面。点击该按钮会将用户重定向到操作定义中指定的网页。
对于需要执行多个步骤的操作,或者无法在收件箱中完成的重要数据捕获操作,应使用“前往”操作。例如,航空公司发送办理值机手续提醒时,可以添加“前往”操作,以便用户快速前往航空公司网站选择座位或申请升舱。
Gmail 中的常用操作
如需了解详情,请参阅 Go-To 操作参考文档。
延伸阅读
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-29。
[null,null,["最后更新时间 (UTC):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)."]]