Get Attachment

gmail.get_attachment
ActionEmailconnection required

Calls messages.get for the part list, then messages.attachments.get.

Download one attachment from a Gmail message as a base64 file blob.

Connection

Required
Yes — the node will not save without one
Auth type
OAuth 2.0
Providers
Gmail
Secret shape
{"client_id", "client_secret", "refresh_token"}
Resolved by
config.connection_id, else node.connection_id

Configuration

4 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
message_id
Gmail message id. Supports {{ }}.
stringYes———
attachment_id
Attachment id from the message's attachments[]. Gmail mints a NEW id on every messages.get, so an id only identifies the bytes, never which part they came from — prefer filename or part_id when the name and MIME type matter. Leave empty to pick by filename, or to take the first attachment.
stringNo———
filename
Download the attachment with this name instead of an id.
stringNo———
part_id
MIME part id from the message's attachments[]. Unlike attachment_id this is stable across fetches, so it is the durable way to name one of several attachments.
stringNo———

Output

One shape.

file

FieldTypeExample
ok
boolean—
message_id
string—
attachment_id
string—
part_id
The MIME part the bytes came from.
string—
file_content
The file, base64-encoded.
string—
content_encoding
stringbase64
filename
stringapp-main.zip
content_type
stringapplication/zip
size
Raw size in bytes (before base64).
number—
{
  "attachment_id": "",
  "content_encoding": "base64",
  "content_type": "application/zip",
  "file_content": "",
  "filename": "app-main.zip",
  "message_id": "",
  "ok": false,
  "part_id": "",
  "size": 0
}

See Get Attachment run in a workflow.

In a technical demo we add the Gmail connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.