IMAP icon

IMAP

Retrieve emails via IMAP

Overview

This node connects to an IMAP email server to retrieve mailbox information and emails. Specifically, the "Mailbox" resource with the "Get Many" operation allows users to fetch multiple mailboxes or mailbox metadata from their email account.

Common scenarios where this node is beneficial include:

  • Synchronizing mailbox lists from an email account for further processing.
  • Retrieving mailbox status information such as message counts or unseen messages.
  • Integrating mailbox data into workflows that automate email management or reporting.

Practical example:

  • A user wants to list all mailboxes in their email account along with the count of unread messages to trigger notifications or archive old emails.

Properties

Name Meaning
Credential Type Choose which credentials to use for connecting: either credentials defined in this node or those from an existing IMAP Trigger node. Options: "IMAP", "N8N IMAP Trigger Node".
Including status fields might slow down the response Notice informing that enabling status fields may reduce performance (shown only for loading mailbox list).
Include Status Fields Select which mailbox status fields to include in the response. Options: "Message Count", "Recent Count", "Unseen Count", "UID Next", "UID Validity", "Highest Modseq".

Output

The node outputs JSON data representing the mailboxes retrieved from the IMAP server. The structure typically includes mailbox names and optionally various status fields if requested, such as:

  • Message count
  • Recent message count
  • Unseen message count
  • UID next value
  • UID validity
  • Highest modification sequence number

If binary data were involved (e.g., email attachments), it would be summarized accordingly, but this operation focuses on mailbox metadata only.

Dependencies

  • Requires access to an IMAP email server.
  • Needs valid IMAP credentials, either provided directly in the node or via an existing IMAP Trigger node's credentials.
  • No additional external services are required beyond the IMAP server.
  • Environment variable N8N_LOG_LEVEL can influence logging verbosity (debug mode enables detailed logs).

Troubleshooting

  • Connection failed: If the node cannot connect to the IMAP server, verify the credentials, server address, port, and network connectivity.
  • Unknown operation/resource: Ensure the selected resource and operation are supported by the node.
  • Slow response when including status fields: Including mailbox status fields can slow down responses; consider disabling some options if performance is critical.
  • Errors during execution: The node captures and logs errors related to IMAP operations. Review error messages for details and check IMAP server logs if accessible.
  • Credential issues: Test credentials using the node's built-in credential test method to confirm validity before running workflows.

Links and References

Discussion