AI-generated Key Takeaways
-
ComposeActionResponse
is used specifically for responses from callback methods that handle compose actions in Gmail add-ons. -
It's crucial to understand that this object is for actions that create draft messages, not for actions used for extending the compose UI.
-
Developers use this object to structure the response when a UI element triggers a compose action, allowing the add-on to pre-fill a Gmail draft.
-
The
printJson()
method assists in debugging by displaying the object's JSON representation.
The response object that may be returned from a callback method for compose action in a Gmail add-on.
const composeActionResponse = 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