Actions2
- EML Actions
Overview
The EML node allows users to create and manipulate EML email files within n8n workflows. Specifically, the "Compose EML" operation enables constructing a complete email message by specifying sender, recipients, subject, body content, attachments, and custom headers. This node is useful when you want to programmatically generate raw email files for archiving, forwarding, or further processing in email-related automation.
Practical examples include:
- Generating an email file from workflow data to send via another service.
- Creating templated emails with dynamic content and attachments.
- Archiving composed emails as EML files for compliance or record-keeping.
Properties
| Name | Meaning |
|---|---|
| From | The email address of the sender. |
| To | The recipient email address(es). Can be a single address or multiple comma-separated addresses, each optionally including a display name. |
| CC | The CC (carbon copy) recipient email address(es), same format as "To". |
| Subject | The subject line of the email. |
| Text | The plain text content of the email body. |
| Optional Parameters | A collection of optional fields: |
| - BCC | The BCC (blind carbon copy) recipient email address(es), same format as "To". |
| - HTML | The HTML content of the email body, allowing rich formatting. |
| - Attachments | Comma-separated list of binary property names to attach as files to the email. |
| - Inline Attachments | Comma-separated list of binary property names to attach inline; filenames are used as content IDs for referencing within the HTML body. |
| Headers | Custom email headers as multiple name-value pairs, allowing adding any additional header fields to the email. |
Output
The node outputs items containing a json field representing the composed email message in EML format. This includes all specified headers, recipients, subject, body (text and/or HTML), and attachments properly encoded. If binary attachments are included, they are embedded in the EML structure accordingly.
No explicit binary output is indicated, but attachments are referenced from input binary properties and incorporated into the EML content.
Dependencies
- No external API services are required.
- The node depends on internal utilities and resource definitions bundled within the node package.
- Users must provide valid email addresses and optionally supply binary data for attachments through prior nodes.
- No special environment variables or credentials are needed for composing EML files.
Troubleshooting
- Invalid Email Addresses: Ensure all email addresses in From, To, CC, and BCC fields are correctly formatted. Improper formats may cause errors or malformed emails.
- Missing Required Fields: The "From" and "To" fields should not be empty; otherwise, the composed email will be incomplete or invalid.
- Attachment References: When specifying attachments or inline attachments, confirm that the binary property names exist in the input data; missing binary data will result in absent attachments.
- Custom Headers: Adding headers with invalid names or values might cause issues in downstream email clients or services.
- Error Handling: Runtime errors during execution are wrapped and reported as node operation errors, which typically indicate misconfiguration or invalid input data.