Actions13
Overview
This node operation creates an email draft in a specified mailbox using the IMAP protocol. It supports two input formats for the email content: structured fields (subject, from, to, text) or a raw RFC822 formatted email string. This operation is useful for automating the creation of email drafts in mailboxes, for example, preparing emails to be reviewed or sent later.
Use Case Examples
- Automatically create draft emails in a specific mailbox based on workflow data.
- Use structured fields to compose simple drafts or provide a full RFC822 formatted email for complex drafts with attachments.
Properties
| Name | Meaning |
|---|---|
| Credential Type | Selects the type of credentials to use for IMAP authentication, either from this node or from an existing N8N IMAP Trigger node. |
| Mailbox | The mailbox where the draft email will be created. Can be selected from a list or specified by full path. |
| Input Format | Determines the format of the email content input, either as separate fields or as a raw RFC822 formatted email. |
| Subject | The subject line of the email draft (shown only if input format is 'Fields'). |
| From | The sender's email address for the draft (shown only if input format is 'Fields'). |
| To | The recipient's email address for the draft (shown only if input format is 'Fields'). |
| Text | The body text of the email draft (shown only if input format is 'Fields'). |
| RFC822 Formatted Email | The full raw RFC822 formatted email content to create the draft (required if input format is 'RFC822'). |
Output
JSON
json- The created draft email data returned from the IMAP server, including metadata and identifiers.
Dependencies
- IMAP server credentials (either node-specific or from an N8N IMAP Trigger node)
Troubleshooting
- Connection failures due to incorrect IMAP credentials or server settings. Verify credentials and server accessibility.
- Errors in email format when using RFC822 input format. Ensure the raw email string is correctly formatted.
- Operation failures if the specified mailbox does not exist or is inaccessible. Confirm mailbox path or selection.
Links
- n8n-nodes-eml - A node to compose complex emails with attachments, recommended for use with RFC822 input format.