Actions17
- Email Actions
- Mailbox Actions
- Thread Actions
Email → Get Attachments
AI-generatedSummary
Download attachments from a specified email by its ID, optionally including inline images and filtering by MIME type.
Inputs
- Authentication — Select the authentication method to use (OAuth2, Basic Auth, or Bearer Token). Defaults to OAuth2.
- Email ID (required) — The ID of the email from which to download attachments.
- Options — Optional settings controlling whether to include inline images embedded in the email body and filtering attachments by MIME types (supports wildcards and comma separation).
Output shape
a list of items where each item represents a single attachment with its metadata in JSON fields and the attachment file as binary data in the 'file' field.
Each attachment item includes emailId, emailSubject, attachmentIndex, fileName, mimeType, fileSize, isInline, and cid in JSON. Inline images can be included or excluded based on the option. Attachments can be filtered by MIME type patterns. No items are returned if no matching attachments are found or if the email does not exist.
Examples
Example 1: Download all regular attachments from an email with ID '12345' excluding inline images.
Set Authentication to the appropriate credential, Email ID to '12345', and leave 'Include Inline Images' false (default) and no MIME type filter.
Example 2: Download only PDF and image attachments including inline images from the email.
Set 'Include Inline Images' to true and 'Filter by MIME Type' to 'application/pdf, image/*'.