Skip to main content
getMessage retrieves one message by its immutable Gmail message ID. Use it after a search or another Gmail operation returns a messageId and you need the complete message content. Attachments are always downloaded and returned as File objects. If you only need identifiers, use Search messages instead.

Example

automations/read-message.automation.ts

Inputs

Each input can also be a compatible Signal from an earlier trigger or action.

Output

Returns a Signal<Message> with the parsed message:
text is derived from html when the source message has no plain-text alternative. receivedAt is Gmail’s mailbox timestamp; sentAt comes from the sender-supplied Date header.
Keep messageId and rfc822MessageId separate. Gmail actions expect the immutable Gmail messageId; rfc822MessageId is the value from the email’s Message-ID header.