IMAP Enhanced icon

IMAP Enhanced

Enhanced IMAP node with custom labels, limit parameters, and structured email fields

Email → Create Draft

AI-generated

Summary

Create an email draft in a specified mailbox via IMAP.

Inputs

  • authentication (required) — Credential source for IMAP connection.
  • destinationMailbox — Mailbox to create the draft in. Defaults to INBOX. Can be selected from a list or provided as a full path matching List Mailboxes output.
  • inputFormat — Select 'Fields' to compose email from subject/from/to/text, or 'RFC822 Formatted Email' to provide complete RFC822 content.
  • subject — The subject of the email (shown when inputFormat is Fields).
  • from — The email address of the sender (shown when inputFormat is Fields).
  • to — The email address of the recipient (shown when inputFormat is Fields).
  • text — The text of the email (shown when inputFormat is Fields).
  • rfc822 (required) — The RFC822 formatted email content (required when inputFormat is rfc822).

Output shape

Array of execution results from the IMAP createDraft action; one result per processed input data row. No data returned yields a warning log. IMAP connection is always closed (logout) after execution.

When inputFormat is 'Fields', the subject, from, to, and text parameters compose the draft. When 'RFC822 Formatted Email' is selected, the rfc822 parameter provides the full email content. Credentials are selected via the Credential Type parameter (IMAP this node or N8N IMAP Trigger node).

Examples

Example 1: Basic draft creation in INBOX using Fields format.

authentication: imapThisNode; destinationMailbox: {mode: 'list', value: 'INBOX'}; inputFormat: 'fields'; subject: 'Meeting notes'; from: 'user@example.com'; to: 'team@example.com'; text: 'Agenda...'

Example 2: Draft creation with pre-formatted RFC822 content.

authentication: imapThisNode; inputFormat: 'rfc822'; rfc822: 'From: user@example.com...'

Discussion