Actions13
Overview
This node connects to an IMAP email server to download a specific email as an EML file. It supports selecting the mailbox and specifying the email by its UID. The downloaded email can be output either as binary data (EML file) or as JSON text. This node is useful for workflows that need to retrieve and process raw email content, such as archiving emails, analyzing email data, or forwarding emails in their original format.
Use Case Examples
- Download an email from the INBOX mailbox by specifying its UID and save it as a binary EML file for archival.
- Retrieve an email from a custom mailbox path and output it as JSON text for further processing or parsing within the workflow.
Properties
| Name | Meaning |
|---|---|
| Credential Type | Selects which IMAP credentials to use for connecting to the email server. Options include using credentials from this node or from an existing N8N IMAP Trigger node. |
| Mailbox | Specifies the mailbox folder to access, either by selecting from a list or providing the full mailbox path. |
| Email UID | The unique identifier of the email to download from the specified mailbox. |
| Output to Binary Data | Determines whether the downloaded email is output as binary EML data or as JSON text. |
| Put Output File in Field | The name of the binary field where the EML file will be stored if outputting as binary data. |
Output
Binary
If 'Output to Binary Data' is true, the email is output as a binary EML file stored in the specified binary property field.
JSON
json- Contains the email data as JSON if outputting as text instead of binary.
Dependencies
- Requires IMAP credentials to connect to the email server, which can be provided either directly in the node or via an existing IMAP Trigger node's credentials.
Troubleshooting
- Connection failures due to incorrect IMAP credentials or server settings. Verify credentials and server details.
- Errors when the specified mailbox path or email UID does not exist. Ensure the mailbox and UID are correct and accessible.
- Operation failures may throw errors with messages from the IMAP server; enabling debug logging can help diagnose issues.
- If 'Output to Binary Data' is true but the binary property name is missing or invalid, the output may fail. Ensure the binary field name is set correctly.