Class Notification

Notification

Displays a notification when users submit and close a dialog.

Available for Google Workspace add-ons that extend Google Chat.

constnotification=AddOnsResponseService.newNotification().setText("You closed a dialog!");

Methods

MethodReturn typeBrief description
setText(text) Notification Sets the text to show in the notification.

Detailed documentation

setText(text)

Sets the text to show in the notification. Required.

constnotification=AddOnsResponseService.newNotification().setText("You closed a dialog!");

Parameters

NameTypeDescription
textStringThe notification text.

Return

Notification — This object, for chaining.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026年04月13日 UTC.