GET
gmail_messages_get.py
from charter.packs import gmail
result = await gmail.messages_get.ainvoke({"id": ...})
Requires
https://www.googleapis.com/auth/gmail.modify. Costs 20 against the provider’s own quota.Path parameters
| Field | Type | Description |
|---|---|---|
userId | string | The user’s email address. The special value ‘me’ can be used to indicate the authenticated user. defaults to "me" |
id * | string | The ID of the message to retrieve. This ID is usually retrieved using messages.list. The ID is also contained in the result when a message is inserted (messages.insert) or imported (messages.import). |
Query parameters
| Field | Type | Description |
|---|---|---|
format | MessageFormat | The format to return the message in. Gmail applies ‘full’ when this is absent. ‘minimal’ returns only email message ID and labels; does not return the email headers, body, or payload. ‘full’ returns the full email message data with body content parsed in the payload field; the raw field is not used. ‘raw’ returns the full email message data with body content in the raw field as a base64url encoded string; the payload field is not used. ‘metadata’ returns only email message ID, labels, and email headers. ‘full’ and ‘raw’ cannot be used when accessing the api using the gmail.metadata scope. |
metadataHeaders | string[] | When given and format is METADATA, only include headers specified. Gmail ignores it under any other format. |