gmail.draftReply derives a reply’s recipient, subject, and conversation headers from a Gmail message and saves it in the same thread.
Example
automations/draft-inbox-reply.automation.ts
messageId must identify the message you want to answer, not merely another message in the same thread.
Inputs
Recipient is an email string or { address: string; name?: string }. Attachment is a File or an object containing file with optional filename, contentId, and disposition: "attachment" | "inline".
Inputs accept compatible signals.
Gmail must return the source message’s thread ID, subject, standard Message-ID, and either Reply-To or From header. The action fails if those reply headers are missing.
The draft carries an authenticated automation origin. If it’s sent later, Gmail triggers don’t wake the automation that created it, while other automations watching the mailbox still receive the event.
Output
ReturnsSignal<DraftIdentifier>: