---
title: "Download a Gmail attachment's bytes as the calling member"
method: GET
path: "/v1/capabilities/google-workspace/gmail-attachment/{messageId}/{attachmentId}"
tags: ["Capability Sources"]
---

# Download a Gmail attachment's bytes as the calling member

`GET /v1/capabilities/google-workspace/gmail-attachment/{messageId}/{attachmentId}`

Downloads one Gmail attachment (file) as base64-encoded bytes, using the messageId and the attachmentId from the gmail-message capability's attachments metadata. Decode dataBase64 locally to reconstruct the file, e.g. a PDF or spreadsheet, then extract its contents.

## Path parameters

- `messageId` string, required
- `attachmentId` string, required

## Response `200`

Gmail attachment returned.

- GoogleWorkspaceGmailAttachmentResponse
  - `ok` true, required
  - `messageId` string, required
  - `attachmentId` string, required
  - `size` number, required — Attachment size in bytes.
  - `dataBase64` string, required — Standard base64-encoded attachment bytes; decode locally to reconstruct the file.

## Other responses

- `401` — The caller must be signed in.
- `409` — The calling member has not connected their Google account or is missing permission.
- `502` — Google rejected the request.

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) · [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openworklabs/den-api/revisions/571dc4a74532/schema)
