Notification

A notification shown to the user as a response to interacting with a UI element.

```javascript
const action = CardService.newAction().setFunctionName('notificationCallback');
CardService.newTextButton().setText('Save').setOnClickAction(action);

// ...

function notificationCallback() {
  return CardService.newActionResponseBuilder()
      .setNotification(
          CardService.newNotification().setText('Some info to display to user'),
          )
      .build();
}
```

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/card-service/notification#setText(String)` | `https://developers.google.com/apps-script/reference/card-service/notification#` | Sets the text to show in the notification. |

## Detailed documentation

### `setText(text)`

Sets the text to show in the notification. Required.

#### Parameters

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

#### Return


`https://developers.google.com/apps-script/reference/card-service/notification#` --- This object, for chaining.