gmail.replyToThread replies to the most recently received message when you have a threadId instead of the exact message ID.
Example
automations/continue-conversation.automation.ts
SENT label. This lets it target the most recently received message even after Gmail archives the conversation.
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.
The action fails if the thread contains no message without the SENT label. The selected message must also contain the headers required for a reply.
The reply carries an authenticated automation origin. Gmail triggers don’t wake the automation that sent it, while other automations watching the mailbox still receive the event.
Output
ReturnsSignal<MessageMetadata>: