Skip to main content

Download Attachment

Downloads an attachment in Gmail.

This node is also exposed as an AI Agent tool.

This node has 1 input port and 1 output port.

Common Properties

Every node shares these.

  • Name — the node's display name on the canvas.
  • Color — the node's colour on the canvas.
  • Delay Before (sec) — wait this long before the node runs.
  • Delay After (sec) — wait this long after the node runs.
  • Continue On Error — carry on instead of failing the flow. Defaults to false.
info

When Continue On Error is true the error is not raised at all, so a Catch node will not see it either.

Inputs

PropertyFieldDescription
Attachment IDinAttachmentIDID of the attachment to download (from Get Email result)
Client IDinClientIDClient ID from Connect node (optional if credentials provided)
Message IDinMessageIDID of the message containing the attachment
Save PathinSavePathFile path where the attachment will be saved

Outputs

PropertyFieldDescription
Saved PathoutFilePathPath where file was saved
SizeoutSizeSize of attachment in bytes

Options

PropertyFieldDescription
CredentialsoptCredentialsGmail OAuth2 credentials (optional - use instead of Connect node)

Requirements

  • A Client ID from this package's Connect node, unless you set credentials directly on this node.
  • Service Account — For server automation and Google Workspace accounts. Requires domain-wide delegation for Gmail access.
    • content — Service Account JSON (textarea, required). Paste the full JSON key file from Google Cloud Console
    • impersonate_email — Impersonate Email (text, required). Email address of the user to impersonate (requires domain-wide delegation)
  • OAuth2 (Personal) — For personal Gmail. Authorize once via browser to access your own emails.
    • _redirect_url — Redirect URL (readonly, optional). Add this to your OAuth app's Authorized redirect URIs
    • client_id — Client ID (text, required). OAuth 2.0 Client ID from Google Cloud Console
    • client_secret — Client Secret (password, required). OAuth 2.0 Client Secret

Store these in a Vault and reference the vault item from the node, rather than typing the secret into the property.

Connect · Disconnect · Send Email · Get Email · List Emails · Reply to Email · Delete Email · Trash Email · Untrash Email · Mark as Read and 15 more

See also