I have this gmail addon which has a composeTrigger
defined in appscript.json
like this.
"composeTrigger": {
"selectActions": [
{
"text": "ComposeTrigger",
"runFunction": "composeTrigger"
}
],
"draftAccess": "METADATA"
},
In Main.js
(or any other file) I have defined composeTrigger
as:
function composeTrigger(event) {
Logger.info(event.draftMetadata)
}
Now this draftMetadata
only contains details of recipients (to, cc, bcc).
I want to access the subject, body and attachments also, but I have been unable to do so.
It's easy to access them when a mail is opened, from event.messsageMetadata
, but event.messageMetadata
is not available on the compose trigger callback.