ComposeActionResponse

The response object that may be returned from a callback method for compose action in a [Gmail add-on](https://developers.google.com/gmail/add-ons).


> [!NOTE]
> **Note** : This object isn't related to **compose actions** that are used to [extend the compose UI](https://developers.google.com/gmail/add-ons/how-tos/extending-compose-ui). Rather, this object is a response to an `https://developers.google.com/apps-script/reference/card-service/action` that [composes draft messages](https://developers.google.com/gmail/add-ons/how-tos/compose) when a specific UI element is selected.

<br />

```javascript
const composeActionResponse =
    CardService.newComposeActionResponseBuilder()
        .setGmailDraft(GmailApp.createDraft('recipient', 'subject', 'body'))
        .build();
```

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/card-service/compose-action-response#printJson()` | `String` | Prints the JSON representation of this object. |

## Detailed documentation

### `printJson()`

Prints the JSON representation of this object. This is for debugging only.

#### Return


`String`