Actions9
Overview
This node connects to an IMAP email server to manage emails and mailboxes. It supports operations such as listing emails, retrieving specific emails, searching, moving, marking, deleting emails, and downloading attachments. The "List Emails" operation fetches emails from a specified folder (mailbox) with an optional limit on the number of emails returned.
Common scenarios include:
- Automating email processing workflows by fetching recent emails from a particular folder.
- Integrating email data into other systems or databases.
- Monitoring inboxes for new messages and triggering actions based on their content.
Example: Fetching the 10 most recent emails from the "INBOX" folder to process them in a workflow.
Properties
| Name | Meaning |
|---|---|
| Folder | The email folder (mailbox) to work with. Can be selected from a list of available folders or specified by name (e.g., "INBOX"). |
| Limit | Maximum number of emails to return when listing or searching emails. Defaults to 10. |
Output
The node outputs an array of items where each item contains a json field representing an email or operation result object. For the "List Emails" operation, each item corresponds to one email's data retrieved from the specified folder.
- The
jsonoutput typically includes email metadata and content fields (subject, sender, date, body, etc.). - If multiple emails are returned, the output is an array of such objects.
- In case of errors (if "Continue On Fail" is enabled), the output item will contain an
errormessage inside thejsonfield.
The node does not explicitly handle binary data output in this operation.
Dependencies
- Requires connection credentials to an IMAP server: host, port, security settings, username, and password.
- Uses the
imapflowlibrary internally to communicate with the IMAP server. - The user must provide valid IMAP credentials configured in n8n.
- Network access to the IMAP server must be allowed from the n8n environment.
Troubleshooting
- Connection failures: Ensure the IMAP server details (host, port, SSL/TLS) and credentials are correct. Verify network connectivity.
- Timeouts during logout: The node attempts a graceful logout with a timeout; if it fails, it forces connection closure. This usually does not affect functionality but may indicate network issues.
- Operation errors: If an operation fails (e.g., invalid folder name), the error message will appear in the output if "Continue On Fail" is enabled. Otherwise, the node execution stops with the error.
- Empty results: Check that the specified folder exists and contains emails. Also verify the "Limit" property is set appropriately.