Class ComposeActionResponse Stay organized with collections Save and categorize content based on your preferences.
Page Summary
ComposeActionResponse is a response object for callback methods in Gmail add-ons that compose draft messages when a UI element is selected.
This object is distinct from the compose actions used to extend the compose UI.
The
printJson()method is available for debugging, returning a String representation of the object.
The response object that may be returned from a callback method for compose action in aGmail add-on.
Note: This object isn't related tocompose actions that areused toextend the compose UI. Rather,this object is a response to anAction thatcomposes draft messages when a specific UI element isselected.
constcomposeActionResponse=CardService.newComposeActionResponseBuilder().setGmailDraft(GmailApp.createDraft('recipient','subject','body')).build();
Methods
| Method | Return type | Brief description |
|---|---|---|
print | 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
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-03 UTC.