Skip to main content
MindStudio
Pricing
Blog About
My Workspace
Google Suite

Get Gmail Attachments

The Get Gmail Attachments block retrieves file attachments from a specific Gmail message and re-hosts them on a CDN, returning publicly accessible URLs for each attachment.

Download and CDN-host attachments from Gmail messages

The Get Gmail Attachments block retrieves file attachments from a specific Gmail message and re-hosts them on a CDN, returning publicly accessible URLs for each attachment. It takes a Gmail message ID as its primary input, along with a Google OAuth connection ID for authentication, and stores the resulting attachment list in a variable you specify. This makes attachment content available for downstream processing without requiring direct access to the Gmail API after the initial fetch.

The block returns an array of attachment objects, each containing the original filename, MIME type, file size in bytes, and a CDN URL where the file can be accessed or downloaded. This structured output makes it straightforward to pass attachments into other workflow steps that need to read, analyze, or store file content.

This block fits naturally into email-processing workflows where incoming Gmail messages may carry files that need to be handled programmatically. It is commonly paired with blocks that search or list Gmail messages to supply the required message ID, and followed by steps that process the retrieved files — such as parsing PDFs, extracting data from spreadsheets, or storing documents in external systems.

What you can build

Real-world workflows powered by the Get Gmail Attachments block.

Invoice Processing Pipeline

Retrieve PDF invoices attached to incoming Gmail messages and pass their CDN URLs to a document parsing step for data extraction.

Contract Review Automation

Pull contract documents from Gmail attachments and route their CDN URLs to an AI analysis step that summarizes or flags key clauses.

Support Ticket File Handling

Extract attachments from customer support emails and store their CDN URLs alongside ticket records in a database or CRM.

Automated Report Ingestion

Download spreadsheet or CSV attachments from scheduled report emails and feed them into a data processing workflow.

Document Archiving Workflow

Collect attachments from filtered Gmail messages and save their CDN-hosted URLs to a document management or cloud storage system.

Image Asset Collection

Retrieve image attachments from Gmail messages and pass their CDN URLs to downstream steps for resizing, tagging, or display.

Ready to add Get Gmail Attachments to your workflow?

Get Started Free

Common questions about Get Gmail Attachments

What parameters does this block require?

The block requires a Gmail message ID (messageId) identifying which email to retrieve attachments from. Optionally, you can provide a Google OAuth connection ID (connectionId) to specify which authenticated Google account to use, and a destination variable name (destinationVar) to store the returned attachment list.

What does the block return?

The block returns an array called attachments. Each item in the array includes the original filename, the MIME type (such as "application/pdf"), the file size in bytes, and a CDN URL where the attachment can be accessed or downloaded.

Where do I get the Gmail message ID needed as input?

The message ID is typically supplied by other Gmail-related blocks in the workflow, such as Search Gmail Emails, List Recent Gmail Emails, or Get Gmail Email steps, which return message IDs as part of their output.

What kinds of workflows commonly use this block?

This block is used in email-processing workflows where attachments need to be accessed programmatically — for example, pipelines that parse invoices, archive documents, process support ticket files, or ingest reports delivered via email.

Are there any limitations on which attachments are retrieved?

The block requires a Google OAuth connection with Gmail readonly scope. Attachments larger than 25MB are skipped and will not appear in the returned array.

Add Get Gmail Attachments to your workflow

Build powerful AI workflows with drag-and-drop blocks. No coding required.