FromMicrosoftGraphEmail@1
The FromMicrosoftGraphEmail@1 node polls a Microsoft 365 (Exchange Online)
mailbox folder through the Microsoft Graph API and triggers the pipeline once per
message. The folder acts as a work queue: on a successful run the message is moved
to a success folder; on failure it stays in place and is retried on later polling
cycles.
For the end-to-end setup (Azure app registration, Mail.ReadWrite application
permission, credentials, deployment), see the
Microsoft 365 E-Mail integration guide.
Adapter Prerequisites
- Mesh Adapter
- An
System.Communication/MicrosoftGraphConfigurationentity (Azure app registration credentials), linked to the pipeline via aSystem.Communication/Usesassociation. - The Azure app registration must hold the Graph application permission
Mail.ReadWrite(admin-consented).
Node Configuration
| Field | Required | Default | Description |
|---|---|---|---|
serverConfiguration | yes | — | WellKnownName of the MicrosoftGraphConfiguration entity holding AzureTenantId / ClientId / ClientSecret. |
mailbox | yes | — | Mailbox to poll, as a user principal name (e.g. user@company.com). |
folderPath | yes | — | Path of the folder to poll, segments separated by / (e.g. Archive/Invoices/ToDo). Resolved from the mailbox root — the inbox is only polled if the path points there. |
moveToFolderPathOnSuccess | no | (none) | Folder the message is moved to after a successful run (e.g. Archive/Invoices/Done). The leaf folder is auto-created (its parent must exist). If omitted, processed messages stay in the source folder. |
pollingIntervalSeconds | no | 120 | Seconds between polling cycles. |
maxMessagesPerPoll | no | 25 | Maximum messages fetched per cycle (oldest first). |
senderFilter | no | (none) | Only process messages whose sender address contains this string. |
maxAttemptsPerMessage | no | 3 | Times a failing message is retried (one attempt per cycle) before it is skipped until the adapter restarts. |
Folder path segments must match the Graph display names, which are not
localized — use Archive, not the localized Outlook name (e.g. Archivieren).
Well-known folders such as inbox and archive also resolve by their well-known
name.
Output
The node emits an array of messages at $.Emails[] (see the
unified message shape).
Because exactly one message is delivered per run, $.Emails always contains a single
element. Only fileAttachment contents are downloaded (base64 in
$.Emails[0].Attachments[].Data); item and reference attachments are skipped.
Usage Example
Poll an invoice folder and stage each PDF attachment (the trigger delivers one message
per run, so the outer ForEach@1 iterates a single element):
triggers:
- type: FromMicrosoftGraphEmail@1
serverConfiguration: MicrosoftGraphDocuments
mailbox: accounting@company.com
folderPath: Archive/Invoices/ToDo
moveToFolderPathOnSuccess: Archive/Invoices/Done
pollingIntervalSeconds: 120
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 ...
The MicrosoftGraphConfiguration referenced by 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.