[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003e\u003ccode\u003eComposeActionResponse\u003c/code\u003e is used specifically for responses from callback methods that handle compose actions in Gmail add-ons.\u003c/p\u003e\n"],["\u003cp\u003eIt's crucial to understand that this object is for actions that create draft messages, not for actions used for extending the compose UI.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers 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.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eprintJson()\u003c/code\u003e method assists in debugging by displaying the object's JSON representation.\u003c/p\u003e\n"]]],[],null,["# Class ComposeActionResponse\n\nComposeActionResponse\n\nThe response object that may be returned from a callback method for compose action in a [Gmail add-on](/gmail/add-ons).\n\n\n| **Note** : This object isn't related to **compose actions** that are used to [extend the compose UI](/gmail/add-ons/how-tos/extending-compose-ui). Rather, this object is a response to an [Action](/apps-script/reference/card-service/action) that [composes draft messages](/gmail/add-ons/how-tos/compose) when a specific UI element is selected.\n\n\u003cbr /\u003e\n\n```javascript\nconst composeActionResponse =\n CardService.newComposeActionResponseBuilder()\n .setGmailDraft(GmailApp.createDraft('recipient', 'subject', 'body'))\n .build();\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|-----------------------------|-------------|------------------------------------------------|\n| [printJson()](#printJson()) | `String` | Prints the JSON representation of this object. |\n\nDetailed documentation\n----------------------\n\n### `print``Json()`\n\nPrints the JSON representation of this object. This is for debugging only.\n\n#### Return\n\n\n`String`"]]