Skip to main content

FromEmail@1

The FromEmail@1 node polls a mailbox over IMAP and triggers the pipeline for new messages. Use it for any IMAP-capable mailbox (Gmail, self-hosted, Exchange with IMAP enabled, …). For Microsoft 365 mailboxes via Microsoft Graph — no stored password, an Azure app registration instead, and folder-as-queue semantics — use FromMicrosoftGraphEmail@1 instead.

Adapter Prerequisites

  • Mesh Adapter
  • An System.Communication/EMailReceiverConfiguration entity (IMAP host / credentials), linked to the pipeline via a System.Communication/Uses association.

Server Configuration (EMailReceiverConfiguration)

Create the IMAP settings as a System.Communication/EMailReceiverConfiguration entity and reference it by WellKnownName from the node's serverConfiguration. Store the password outside of source control.

- rtId: <config-rtId>
ckTypeId: System.Communication/EMailReceiverConfiguration
rtWellKnownName: InvoiceMailbox
attributes:
- id: System.Communication/Host
value: "imap.example.com"
- id: System.Communication/Port
value: 993
- id: System.Communication/Username
value: "accounting@example.com"
- id: System.Communication/Password
value: "<password>"
- id: System.Communication/IsSslEnabled
value: true
- id: System.Communication/Folder # optional, defaults to INBOX
value: "INBOX"
AttributeRequiredDefaultDescription
HostyesIMAP server host name.
PortyesIMAP port (typically 993 for SSL, 143 for STARTTLS).
UsernameyesLogin user.
PasswordyesLogin password.
IsSslEnabledyestrue → implicit SSL on connect (SslOnConnect); falseStartTlsWhenAvailable.
FoldernoINBOXMailbox folder to poll.

The serverConfiguration must be linked to the pipeline through a System.Communication/Uses association — the GlobalConfiguration is built only from Uses associations, the name alone is not resolved:

# on the Pipeline entity
associations:
- roleId: System.Communication/Uses
targetRtId: <config-rtId>
targetCkTypeId: System.Communication/EMailReceiverConfiguration

Node Configuration

FieldRequiredDefaultDescription
serverConfigurationyesWellKnownName of the EMailReceiverConfiguration entity.
pollingIntervalSecondsno60Seconds between polling cycles.
onlyUnreadnotrueOnly process unread (unseen) messages. When false, all messages in the folder are searched.
markAsReadnotrueMark a message as read after it has been processed.
deleteAfterProcessingnofalseDelete a message after it has been processed.
senderFilterno(none)Only process messages whose sender address contains this string.
subjectFilterno(none)Only process messages whose subject contains this string.
Avoiding reprocessing

The node de-duplicates within a single adapter run by message UID. To avoid reprocessing across restarts, keep onlyUnread: true with markAsRead: true, or set deleteAfterProcessing: true when the mailbox folder is a dedicated work queue.

Output

The node emits an array of messages at $.Emails[], the same unified shape produced by FromMicrosoftGraphEmail@1 / FromTeamsBot@1 (see Microsoft 365 E-Mail — unified message shape):

$.Emails[0].Subject
$.Emails[0].From — sender (display name + address)
$.Emails[0].FromAddress — sender address only
$.Emails[0].To
$.Emails[0].Date
$.Emails[0].Body — also HtmlBody / TextBody
$.Emails[0].MessageId
$.Emails[0].Attachments[0].FileName
$.Emails[0].Attachments[0].ContentType
$.Emails[0].Attachments[0].Length
$.Emails[0].Attachments[0].Data — base64 file content

Usage Example

Poll an inbox for unread invoice mails and process each attachment:

triggers:
- type: FromEmail@1
serverConfiguration: InvoiceMailbox
pollingIntervalSeconds: 60
onlyUnread: true
markAsRead: true
senderFilter: "@supplier.com"
transformations:
- type: ForEach@1
iterationPath: $.Emails
targetPath: $.emailResults
targetValueKind: Simple
targetValueWriteMode: Overwrite
transformations:
- type: ForEach@1
iterationPath: $.key.Attachments
targetPath: $.attachmentResults
targetValueKind: Simple
targetValueWriteMode: Overwrite
transformations:
- type: If@1
path: $.key.ContentType
operator: Equals
value: "application/pdf"
valueType: String
transformations:
# ... store $.key.Data, run OCR / AI, create entities ...