IMAP icon

IMAP

Retrieve emails via IMAP

Email → Create Draft

AI-generated

Summary

Create an email draft in a specified mailbox by composing the email either from individual fields or providing a full RFC822 formatted email content.

Inputs

  • Credential Type (required) — Choose credentials source: use this node's credentials or reuse credentials from an n8n IMAP Trigger node.
  • Mailbox (required) — Select the destination mailbox where the draft email will be created.
  • Input Format (required) — Select how to provide the email content – as individual fields or as an RFC822 formatted email string.
  • Subject — Subject of the email (used only if input format is 'Fields').
  • From — Email address of the sender (used only if input format is 'Fields').
  • To — Email address of the recipient (used only if input format is 'Fields').
  • Text — Plain text content of the email body (used only if input format is 'Fields').
  • RFC822 Formatted Email (required) — Full RFC822 formatted email content, required if input format is 'RFC822 Formatted Email'.

Output shape

a list with a single item containing JSON information about the draft creation result

The output JSON contains the IMAP server response to the draft creation. If the input format is 'Fields', the email is composed internally using nodemailer; if 'RFC822', the provided raw email content is used as is.

Examples

Example 1: Create a draft by specifying fields

Set Credential Type to 'IMAP', Mailbox to desired draft folder (e.g., INBOX), choose Input Format 'Fields', then provide Subject, From, To, and Text fields.

Example 2: Create a draft using a raw RFC822 email

Set Credential Type, select Mailbox, choose Input Format 'RFC822 Formatted Email', and paste the full raw email content in RFC822 Formatted Email parameter.

Links

Discussion