IMAP icon

IMAP

Retrieve emails via IMAP

Overview

This node connects to an IMAP email server to retrieve multiple mailboxes and their status information. It is useful for scenarios where you need to list all mailboxes in an email account along with optional status fields such as message count, recent count, unseen count, UID next, UID validity, and highest modseq. For example, it can be used to monitor mailbox statuses or to fetch mailbox metadata for further processing in an automation workflow.

Use Case Examples

  1. Retrieve all mailboxes from an IMAP account using credentials stored in the node.
  2. Fetch mailbox list including message count and unseen count to monitor unread emails.

Properties

Name Meaning
Credential Type Selects which credentials to use for connecting to the IMAP server, either credentials from this node or from an existing N8N IMAP Trigger node.
Include Status Fields Specifies which mailbox status fields to include in the response, such as message count, recent count, unseen count, UID next, UID validity, and highest modseq.

Output

JSON

  • mailboxes - An array of mailbox objects retrieved from the IMAP server, each containing mailbox metadata and optionally the requested status fields.

Dependencies

  • IMAP server credentials (either node-specific or from an IMAP trigger node)

Troubleshooting

  • Connection failures due to incorrect credentials or network issues. Verify credentials and network connectivity.
  • Operation errors if the mailbox list cannot be retrieved, possibly due to server restrictions or permissions.
  • Timeouts or slow responses when including multiple status fields; consider limiting the number of status fields requested.
  • Errors related to IMAP protocol issues are caught and logged; enabling debug mode can provide more detailed logs.

Discussion