Input & Output
Output schemas for all three IMAP Trigger formats — simple, resolved, and raw — with attachment object detail and downstream field reference patterns.
The simple format returns a parsed, developer-friendly email object. Attachment download is only available in this format.
simple — Field Reference
| Field | Type | Description |
|---|---|---|
from | string | Sender's email address as a plain string (e.g. "Jane Smith <jane@example.com>"). |
to | string | Primary recipient(s) as a plain string. |
cc | string | CC recipient(s) as a plain string. Empty string if not present. |
subject | string | Email subject line, decoded from any MIME encoding. |
date | string | Message date from the Date header. RFC 2822 format. |
messageId | string | Value of the Message-ID header. |
inReplyTo | string | Value of the In-Reply-To header, if present. |
text | string | Plain text body of the email. Empty string if the email has no text/plain part. |
html | string | HTML body of the email. Empty string if the email has no text/html part. |
attachments | object[] | Array of attachment objects. See attachment schema below. Binary data present only when DownloadAttachments: true. |
uid | integer | IMAP UID of the message. Unique within the mailbox folder. |
flags | string[] | Current IMAP flags on the message (e.g. ["\\Seen"], ["\\Flagged"]). |
{
"from": "supplier@vendorcorp.com",
"to": "accounts@mycompany.com",
"cc": "",
"subject": "Invoice #INV-2026-0417",
"date": "Fri, 23 May 2026 11:42:07 +0000",
"messageId": "<CA+xyz123abc@mail.vendorcorp.com>",
"inReplyTo": "",
"text": "Please find attached invoice #INV-2026-0417 for services in April 2026. Amount: $3,800.00. Due: 22 Jun 2026.",
"html": "<p>Please find attached invoice...</p>",
"uid": 4872,
"flags": [],
"attachments": [
{
"fileName": "Invoice_INV-2026-0417.pdf",
"mimeType": "application/pdf",
"size": 91204,
"contentId": "",
"binaryKey": "attachment_0",
"error": null
}
]
}
The resolved format returns fully structured email data with ImapAddressInfo objects for all address fields. Use this format when you need to programmatically access display names and email addresses separately.
resolved — Field Reference
| Field | Type | Description |
|---|---|---|
from | ImapAddressInfo[] | Array of sender address objects, each with Name (display name, may be empty) and Address (email address). |
to | ImapAddressInfo[] | Array of primary recipient address objects. |
cc | ImapAddressInfo[] | Array of CC recipient address objects. Empty array if not present. |
replyTo | ImapAddressInfo[] | Reply-To address objects, if specified in the email headers. |
subject | string | Email subject line. |
date | string | Message date in RFC 2822 format. |
messageId | string | Message-ID header value. |
inReplyTo | string | In-Reply-To header value. |
text | string | Plain text body. |
html | string | HTML body. |
uid | integer | IMAP UID of the message. |
flags | string[] | Current IMAP flags. |
attachments | object[] | Attachment metadata array. Binary download not available in resolved format. |
ImapAddressInfo Object
| Field | Type | Description |
|---|---|---|
Name | string | Display name from the email address header (may be empty string if not present). |
Address | string | The email address (e.g. "jane@example.com"). |
{
"from": [
{ "Name": "Vendor Corp Billing", "Address": "billing@vendorcorp.com" }
],
"to": [
{ "Name": "Accounts Payable", "Address": "accounts@mycompany.com" }
],
"cc": [
{ "Name": "John Smith", "Address": "john.smith@mycompany.com" }
],
"replyTo": [],
"subject": "Invoice #INV-2026-0417",
"date": "Fri, 23 May 2026 11:42:07 +0000",
"messageId": "<CA+xyz123abc@mail.vendorcorp.com>",
"inReplyTo": "",
"text": "Please find attached invoice...",
"html": "<p>Please find attached invoice...</p>",
"uid": 4872,
"flags": []
}
The raw format returns the complete RFC 822 email message as a base64-encoded binary. No parsing is performed. Attachments are not extracted separately — they are embedded within the raw MIME structure.
raw — Field Reference
| Field | Type | Description |
|---|---|---|
uid | integer | IMAP UID of the message. |
flags | string[] | Current IMAP flags on the message. |
data | string | Base64-encoded RFC 822 email bytes. Decode to obtain the full MIME message including all headers, body parts, and attachments. |
size | integer | Size of the raw email in bytes (before base64 encoding). |
{
"uid": 4872,
"flags": [],
"size": 142891,
"data": "UmVjZWl2ZWQ6IGZyb20gbWFpbC52ZW5kb3Jjb3JwLmNvbSAoW..."
}
Present in simple and resolved format outputs within the attachments array.
| Field | Type | Description |
|---|---|---|
FileName | string | Original filename of the attachment as provided in the MIME Content-Disposition header. |
MimeType | string | MIME type of the attachment (e.g. "application/pdf", "image/jpeg", "text/csv"). |
Size | integer | Attachment size in bytes. |
ContentId | string | MIME Content-ID value, used for inline attachments (embedded images). Empty string for standard attachments. |
BinaryKey | string | Binary field name where attachment data is stored when DownloadAttachments: true. Format: {AttachmentsBinaryPropertyPrefix}{index} (e.g. attachment_0). Empty string when attachments are not downloaded. |
Error | string | null | Error message if the attachment could not be downloaded (e.g. size limit exceeded). null when download succeeded. |
Referencing Trigger Output in Downstream Nodes
If the IMAP Trigger node is named imapTrigger, reference its output fields using the following patterns:
| Value Needed | Expression (simple format) |
|---|---|
| Sender address | {{ nodes.imapTrigger.output.from }} |
| Subject line | {{ nodes.imapTrigger.output.subject }} |
| Plain text body | {{ nodes.imapTrigger.output.text }} |
| HTML body | {{ nodes.imapTrigger.output.html }} |
| Message date | {{ nodes.imapTrigger.output.date }} |
| UID (for downstream tracking) | {{ nodes.imapTrigger.output.uid }} |
| First attachment filename | {{ nodes.imapTrigger.output.attachments[0].FileName }} |
| First attachment MIME type | {{ nodes.imapTrigger.output.attachments[0].MimeType }} |
| First attachment binary key | {{ nodes.imapTrigger.output.attachments[0].BinaryKey }} |
For resolved format, address fields are arrays of ImapAddressInfo objects:
| Value Needed | Expression (resolved format) |
|---|---|
| Sender email address | {{ nodes.imapTrigger.output.from[0].Address }} |
| Sender display name | {{ nodes.imapTrigger.output.from[0].Name }} |
| First recipient address | {{ nodes.imapTrigger.output.to[0].Address }} |
| First CC recipient address | {{ nodes.imapTrigger.output.cc[0].Address }} |
DownloadAttachments: true, each attachment's binary data is available as a binary field on the trigger output using the key stored in attachments[n].BinaryKey. Pass this key to downstream nodes that accept binary input (e.g. file processing, S3 upload, FlowRag).
html field in simple and resolved formats contains the raw HTML body as received from the email sender. Always sanitise HTML output before rendering it in a user interface or injecting it into other systems.