Actions12
- Mailbox Actions
- Email Actions
Overview
This node connects to an IMAP email server to retrieve emails and perform related IMAP operations. It is useful for workflows that need to access, search, or manipulate emails stored on an IMAP server, such as automating email processing, filtering incoming messages, or integrating email data into other systems.
Typical use cases include:
- Fetching new emails from an inbox for further processing.
- Searching emails based on criteria like sender, subject, or date.
- Accessing multiple mailboxes/folders within an email account.
- Integrating with other services by extracting email content automatically.
Properties
| Name | Meaning |
|---|---|
| Credential Type | Selects which credentials to use for connecting to the IMAP server: - IMAP: Use credentials defined directly in this node. - N8N IMAP Trigger Node: Use existing credentials from a separate IMAP trigger node configured in n8n. |
Note: The node also dynamically loads additional properties depending on the selected resource and operation, but since only the default resource and operation are requested, no further specific properties are listed here.
Output
The node outputs JSON data representing the results of the executed IMAP operation. This typically includes email metadata and content retrieved from the IMAP server, structured according to the chosen operation.
If the operation returns multiple items (e.g., multiple emails), they are output as an array of JSON objects.
Binary data output is not explicitly mentioned in the provided code, so it is assumed the node primarily outputs JSON-formatted email data rather than raw binary attachments.
Dependencies
- Requires valid IMAP credentials to connect to the email server. These can be provided either directly in the node or reused from an existing IMAP trigger node.
- Uses an internal IMAP client utility to manage connection and communication with the IMAP server.
- Environment variable
N8N_LOG_LEVELcan influence logging verbosity (debug mode enables more detailed logs). - No external API keys beyond the IMAP credentials are required.
Troubleshooting
- Connection failures: If the node cannot connect to the IMAP server, it logs an error with the message "Connection failed" followed by details. Common causes include incorrect credentials, network issues, or server unavailability. Verify credentials and network access.
- Unknown operation/resource errors: If an unsupported resource or operation is selected, the node throws an error indicating the unknown operation/resource. Ensure the correct resource and operation names are used.
- Operation execution errors: Errors during IMAP actions are caught and logged. The node attempts to collect detailed error information. If an error occurs, check the error message for clues such as authentication failure, mailbox access issues, or malformed queries.
- Logging: Setting
N8N_LOG_LEVELtodebugcan help diagnose issues by providing detailed logs of the IMAP client’s activity.