Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
Show all 7 items in the list
Tags used for linking issues. [ID: 1172495]
View issue level access limits(Press Alt + Right arrow for more information)
Request for new functionality
View staffing
Description
The compose trigger event object (e.gmail) in Gmail add-ons lacks properties to read or edit the draft body, even after autosave, restricting functionality to subject-only operations.
Steps to Reproduce:
Create a compose trigger add-on:
"gmail": {"composeTrigger": {"selectActions": [{"text": "Test", "runFunction": "test"}],"draftAccess": "METADATA"}} Try to read/edit the draft:
Deploy, compose an email, wait for autosave, and click the button.
Actual Result:
e.gmail only provides {"subject":"[typed subject]"}; draftId and accessToken are undefined. Can’t read the body (e.g., via GmailApp.getDraft()) or edit it (e.g., via update()), resulting in errors like "Not found" or "Missing access token."
Expected Result:
e.gmail should include draftId and accessToken to enable reading the body (e.g., GmailApp.getDraft(draftId).getMessage().getPlainText()) and editing it (e.g., GmailApp.getDraft(draftId).update(...)).
Impact:
Blocks compose-time add-ons needing to process or modify the draft body (e.g., spell checkers, formatters).