Actions12
- Mailbox Actions
- Email Actions
Email → Download as EML
AI-generatedSummary
Fetch a specific email by UID from an IMAP mailbox and return it as a raw .eml file or text in JSON format.
Inputs
- authentication — Select whether to use credentials from this node or an existing N8N IMAP Trigger node.
- mailboxPath — Select or specify the mailbox containing the email.
- emailUid — The unique identifier (UID) of the email message to download.
- outputToBinary — Whether to output the EML file as binary data or as raw text in JSON.
- binaryPropertyName (required) — The binary field name to store the EML file when Output to Binary Data is enabled.
- includeBody — Whether to include parsed body content (text, markdown, html) in the output.
- cleanHtml — Whether to sanitize HTML content by stripping unreadable tags and attributes.
- includeRawHtml — Whether to include original unmodified HTML content when body parsing is enabled.
Output shape
A single item containing either binary data with the .eml file or JSON text content.
When Output to Binary Data is enabled, the result is attached as binary data under the specified field name.
Examples
Example 1: Download an email as an EML attachment
Set Mailbox to INBOX, enter the Email UID, leave Output to Binary Data set to true, and set Put Output File in Field to 'data'.
Example 2: Retrieve raw EML text and parsed HTML body in JSON
Enter the Email UID, disable Output to Binary Data, and enable Include Email Body.