Open email attachment

Email inbox
Open email attachment
Success
Attachment(Email attachment)
Error
Content(Input stream)

Description

Downloads one attachment and exposes its decoded contents as a stream. Takes an attachment object from an email's attachments field — the server connection comes from the attachment itself. Wire the stream into Stream to string, Copy stream, or an HTTP request body. Branches on success/error.

When to use

Use Open email attachment to get at the bytes of a file someone emailed you: an invoice PDF, a CSV of orders, an image. Find emails already tells you what is attached — filename, content type, size — without transferring anything; this node is what fetches one attachment’s payload.

Get to an attachment by breaking an email and looping over its attachments array with For each. Break the element to read its fileName, contentType and inline flag so you can pick the one you want, then wire that same element into this node.

Two things worth knowing about the metadata. fileName is nullable — a part can be attached with no name at all — so run it through Default if null before using it as a filename. And size is the transfer-encoded octet count the server reports, which is roughly 4/3 of the real file size for base64-encoded attachments; treat it as an estimate, not the byte count you will get out of the stream.

Attachments are capped at 25 MiB. A larger one takes the Error branch rather than arriving truncated.

Pins

Input pins

Pin Type Default Notes
Attachment Email attachment — An attachment object from an email's `attachments` field (Break an email, then loop over the array). It carries the folder, message UID, MIME part path and server connection it came from, so this node needs no credentials.

Output pins

Pin Type Notes
Content Input stream The attachment's decoded bytes — base64 and quoted-printable are already undone, so this is the file as it would land on disk. Wire it into Stream to string for text, or straight into an HTTP request body or Copy stream to forward it without materialising it as a string.

Execution pins

Pin Direction
In Input
Success Output
Error Output

Example

File every PDF invoice onto an SFTP server. After Find emails and For each, Break the element and pass its Attachments into a second For each. Inside it, Break the attachment and Branch on whether contentType equals application/pdf. On the true path, wire the attachment into Open email attachment, then Copy stream into an FTP upload — the bytes never become a string, so a 20 MB scan streams straight through.

See also