replyThread finds the latest received message in a Gmail thread and replies
to it. Use it when your automation stores a conversation’s threadId rather
than the exact message that should receive the next response.
Example
automations/continue-conversation.automation.ts
SENT label. This lets it target
the latest received message even after the conversation has been archived.
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".
Every input, including account, also accepts a compatible Signal.
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.
Output
Returns aSignal<MessageMetadata> with: