Mail Models
Overview
This page describes the mail models returned by workflow email activities such as Read IMAP Email and Read Outlook Email.
These models can be bound through the Process Data drawer and used by downstream workflow activities.
Email
Represents a single email message returned by email read activities.
Returned by:
- Read IMAP Email
- Read Outlook Email
Properties
| Property | Type | Description |
|---|---|---|
| From | String | Sender email address. |
| Sender | String | Sender display name or sender header value. |
| To | String | Recipient email addresses. |
| Cc | String | CC recipient email addresses. |
| Bcc | String | BCC recipient email addresses. |
| ReplyTo | String | Reply-To email addresses. |
| Subject | String | Email subject. |
| TextBody | String | Plain-text content of the email. |
| HtmlBody | String | HTML content of the email. |
| SentAt | DateTime | Date and time the email was sent. |
| ReceivedAt | DateTime | Date and time the email was received. |
| Priority | String | Email priority. |
| InReplyTo | String | In-Reply-To header value. |
| References | String | References header value. |
| MessageId | String | Mailbox identifier used by the read, mark, and delete activities: IMAP UID or Microsoft Graph message ID. |
| InternalId | String | Internet message identifier from the message header. Do not use this field as the mailbox identifier for mark/delete activities. |
| Attachments | List<EmailAttachment> | Attachments associated with the email. |
Message identifiers
Despite its name, MessageId contains the mailbox identifier used by workflow email operations. Bind the current email's MessageId to Message Identifier on the matching IMAP or Outlook mark/delete activity. Keep the same connection and, for IMAP, the same mail folder.
InternalId contains the message's Internet Message-ID header value. It can help correlate mail across systems but is not the provider lookup key expected by those activities.
EmailAttachment
Represents a single attachment within an email.
Returned through:
- Email.Attachments
Properties
| Property | Type | Description |
|---|---|---|
| FileName | String | Attachment file name. |
| ContentType | String | Attachment MIME type (for example, application/pdf or image/png). |
| Size | Int64 | Attachment size in bytes. |
| AttachmentReference | String | Serialized AttachmentReference used by attachment retrieval activities. |
| File | FileReference | File handle that can be passed directly to file-consuming activities. See File Reference. |
Usage Notes
- Use AttachmentReference with attachment retrieval activities such as Get IMAP Email Attachment and Get Outlook Email Attachment.
- Use File when passing attachments directly to activities that accept a File Reference.
- Use Add To Collection to build a
FileReference[]for activities that accept multiple files.
AttachmentReference
Identifies a specific attachment within a mailbox message.
This object is serialized into EmailAttachment.AttachmentReference as a JSON string.
Properties
| Property | Type | Description |
|---|---|---|
| ConnectionName | String | Email connection used to read the message. |
| ServerType | String | Email server type (IMAP or Outlook). |
| MessageIdentifier | String | IMAP UID or Outlook Graph message ID. |
| AttachmentIndex | Int32? | Attachment index for IMAP messages. |
| AttachmentId | String | Attachment identifier for Outlook messages. |
Usage Notes
Pass the AttachmentReference value to: