Imprime la représentation JSON de cet objet. Cette option est réservée au débogage.
Renvois
String
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/26 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/26 (UTC)."],[[["\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,["ComposeActionResponse\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\nMethods\n\n| Method | Return type | Brief description |\n|-----------------------------|-------------|------------------------------------------------|\n| [printJson()](#printJson()) | `String` | Prints the JSON representation of this object. |\n\nDetailed documentation \n\n`print``Json()` \nPrints the JSON representation of this object. This is for debugging only.\n\nReturn\n\n\n`String`"]]