Skip to content
Software capabilities

Workplace

Gmail

Messages, threads, attachments, and labels.

Tasks
5
Documented methods
11
Ways in
API5Interface3MCP1SDK1
Sources
developers.google.com, support.google.com, googleapis.github.io

What you can do with Gmail

  • 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, Interface
  • 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, MCP
  • 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.

    API, Interface
  • Recover a stale Gmail history ID

    Use history.list while the saved startHistoryId is valid. If an outdated ID causes a 404, rebuild the local mailbox index and save the historyId of the most recent message from the full sync.

    API, SDK