IMAP icon

IMAP

Retrieve emails via IMAP

Mailbox → Get Many

AI-generated

Overview

This node operation retrieves multiple mailboxes from an IMAP server. It is useful for scenarios where you need to list or manage mailboxes in an email account, such as displaying all available folders or syncing mailbox information for further processing.

Use Case Examples

  1. Listing all mailboxes in an email account to display in a user interface.
  2. Fetching mailbox details to monitor or manage email folders programmatically.

Properties

Name Meaning
Credential Type Specifies 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 Select which mailbox status fields to include in the response, such as message count, recent count, unseen count, UID next, UID validity, and highest modseq. Including these fields may slow down the response.

Output

JSON

  • mailboxName - The name of the mailbox/folder.
  • path - The full path of the mailbox on the IMAP server.
  • delimiter - The delimiter character used in mailbox paths.
  • flags - Flags associated with the mailbox, such as \HasNoChildren or \HasChildren.
  • status
    • messageCount - The total number of messages in the mailbox, if requested.
    • recentCount - The number of recent messages in the mailbox, if requested.
    • unseenCount - The number of unseen messages in the mailbox, if requested.
    • uidNext - The next unique identifier value for the mailbox, if requested.
    • uidValidity - The UID validity value for the mailbox, if requested.
    • highestModseq - The highest modification sequence value for the mailbox, if requested.

Dependencies

  • An IMAP server and valid IMAP credentials, which can be provided either directly in the node or via an existing N8N IMAP Trigger node.

Troubleshooting

  • Connection failures due to incorrect credentials or network issues. Verify the IMAP credentials and network connectivity.
  • Operation returning no data if the mailbox list is empty or the server does not support the requested status fields.
  • Errors related to IMAP server responses, which are caught and logged. Check the error messages for details and ensure the IMAP server supports the requested operations.

Discussion