Actions13
Email → Create Draft
AI-generatedSummary
Creates an email draft in the specified IMAP mailbox using either field-based configuration or an RFC822 formatted string.
Inputs
- authentication (required) — Select the credentials type: 'IMAP Fork Credentials' (uses node-specific credentials) or 'N8N IMAP Trigger Node' (uses core IMAP credentials).
- destinationMailbox (required) — Select the target mailbox (e.g., INBOX, Sent) where the draft will be saved. Can be selected from a list or entered as a full path.
- inputFormat — Choose how to provide the email content: 'Fields' to compose using subject, from, to, and text fields, or 'RFC822 Formatted Email' to paste a pre-formatted raw email.
- subject — The subject line of the email (visible only when using 'Fields' format).
- from — The sender's email address (visible only when using 'Fields' format).
- to — The recipient's email address (visible only when using 'Fields' format).
- text — The body text of the email (visible only when using 'Fields' format).
- rfc822 (required) — The raw RFC822 formatted email string (required when using 'RFC822 Formatted Email' format).
Output shape
A list of items, each containing a JSON object with the IMAP server's response details (e.g., UID, server-generated flags).
The operation opens the destination mailbox in read-write mode before appending the draft. If the draft is created successfully, the server returns a response object; otherwise, a NodeImapError is thrown.
Examples
Example 1: Compose a simple text email to a recipient.
Select 'Fields' format, enter recipient and subject, and provide the text body.
Example 2: Create a draft from a pre-formatted raw email file.
Select 'RFC822 Formatted Email' format and paste the raw email content into the rfc822 field.