IMAP icon

IMAP

Retrieve emails via IMAP

Overview

This node operation creates a new mailbox in an IMAP email account. It supports creating either a top-level mailbox or a child mailbox under a specified parent mailbox. This is useful for organizing email folders programmatically, such as setting up new folders for categorizing incoming emails or managing mailbox structure automatically.

Use Case Examples

  1. Create a new top-level mailbox named 'Projects' to organize project-related emails.
  2. Create a child mailbox named 'Invoices' under the 'Finance' mailbox to separate invoice emails.

Properties

Name Meaning
Credential Type Selects which IMAP credentials to use for authentication, either from this node or from an existing N8N IMAP Trigger node.
Top Level Mailbox Boolean flag indicating whether the mailbox to create is a top-level mailbox or a child mailbox.
Mailbox The parent mailbox path under which to create the new mailbox. Required only if creating a child mailbox.
Mailbox Name The name of the mailbox to create.

Output

JSON

  • json - Contains the result of the mailbox creation operation, typically including details about the created mailbox.

Dependencies

  • Requires IMAP credentials for authentication, 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 network issues. Verify credentials and network connectivity.
  • Errors when creating a mailbox with a name that already exists or contains invalid characters. Ensure mailbox names are unique and valid.
  • If creating a child mailbox, ensure the specified parent mailbox path exists.
  • General IMAP errors may be caught and logged; enabling debug mode can provide more detailed error information.

Links

  • IMAP CREATE Command - Official IMAP protocol documentation for the CREATE command used to create mailboxes.

Discussion