Workplace
Gmail
Messages, threads, attachments, and labels.
Gmail capabilities
- API / Interface
How to download Gmail attachments
For an attachment with an attachmentId, call users.messages.attachments.get and decode the returned data as base64url. For a one-off download, open the message in Gmail and use the attachment’s Download button.
- API / Interface
How to search Gmail messages
Use Gmail search operators in the inbox or pass a query as q to users.messages.list. The API returns message IDs that you can use to fetch individual messages.
- API / MCP
How to retrieve the body of a Gmail message
Call users.messages.get with format=full to inspect the parsed message or format=raw to get the original MIME payload. A connected Gmail MCP client can retrieve the body using get_message.
- API / Interface
How to apply a Gmail label
Use users.messages.modify with addLabelIds to label one message programmatically. Gmail’s Labels menu handles manual labeling from a message or a selection.