IMAP icon

IMAP

Retrieve emails via IMAP

Overview

This node connects to an IMAP email server to retrieve the status of a specified mailbox. It is useful for monitoring mailbox conditions such as the number of messages, recent messages, unseen messages, and other mailbox status indicators. Practical applications include email management workflows where you need to check mailbox status before processing emails or triggering further actions.

Use Case Examples

  1. Check the status of the INBOX mailbox to see how many unread emails are present.
  2. Monitor a specific mailbox path to track new incoming messages or mailbox changes.

Properties

Name Meaning
Credential Type Selects which IMAP credentials to use for connecting to the email server, either credentials from this node or from an existing N8N IMAP Trigger node.
Mailbox Specifies the mailbox path to retrieve the status from. Can be selected from a list of mailboxes or entered as a full path string.

Output

JSON

  • messages - Total number of messages in the mailbox.
  • recent - Number of recent messages in the mailbox.
  • unseen - Number of unseen (unread) messages in the mailbox.
  • uidNext - The next unique identifier value for new messages.
  • uidValidity - The unique identifier validity value for the mailbox.
  • flags - Flags applicable to the mailbox.

Dependencies

  • Requires IMAP credentials, which can be provided either directly in the node or via an existing N8N IMAP Trigger node's credentials.

Troubleshooting

  • Connection failures due to incorrect IMAP credentials or server settings. Verify credentials and server details.
  • Errors during mailbox status retrieval may occur if the mailbox path is invalid or inaccessible. Ensure the mailbox path is correct and the user has access rights.
  • IMAP connection errors might be logged; enabling debug logging can help diagnose issues.

Discussion