Action

An action that Google Workspace add-ons that extend Google Workspace Studio can use to render a
new card.

Only available for Google Workspace add-ons that extend Google Workspace Studio.

```javascript
const link = AddOnsResponseService.newLink().setUrl('https://www.google.com');
const action =
    AddOnsResponseService.newAction()
        .setLink(link);

const renderAction = AddOnsResponseService.newRenderActionBuilder().setAction(action).build();
```

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/add-ons-response-service/action#addModifyCard(ModifyCard)` | `https://developers.google.com/apps-script/reference/add-ons-response-service/action#` | Adds a ModifyCard operation to the action. |
| `https://developers.google.com/apps-script/reference/add-ons-response-service/action#addNavigation(Navigation)` | `https://developers.google.com/apps-script/reference/add-ons-response-service/action#` | Adds a card navigation to the action. |

## Detailed documentation

### `addModifyCard(modifyCard)`

Adds a ModifyCard operation to the action.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `modifyCard` | `https://developers.google.com/apps-script/reference/add-ons-response-service/modify-card` | The `https://developers.google.com/apps-script/reference/add-ons-response-service/modify-card` to use. |

#### Return


`https://developers.google.com/apps-script/reference/add-ons-response-service/action#` --- This action object, for chaining.

*** ** * ** ***

### `addNavigation(navigation)`

Adds a card navigation to the action.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `navigation` | `https://developers.google.com/apps-script/reference/add-ons-response-service/navigation` | The `https://developers.google.com/apps-script/reference/add-ons-response-service/navigation` to use. |

#### Return


`https://developers.google.com/apps-script/reference/add-ons-response-service/action#` --- This action object, for chaining.

#### Throws


[`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) --- if the navigation argument is invalid.