# Class Notification

Notification

Displays a notification when users submit and close a dialog.

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

```javascript
const notification = AddOnsResponseService.newNotification().setText("You closed a dialog!");
```

### Methods

| Method | Return type | Brief 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.

```javascript
const notification = AddOnsResponseService.newNotification().setText("You closed a dialog!");
```

#### Parameters

| Name | Type | Description |
|---|---|---|
| `text` | `String` | The notification text. |

#### Return


`Notification` --- This object, for chaining.