Skip to main content

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/MicrosoftGraphConfiguration entity (Azure app registration credentials), linked to the pipeline via a System.Communication/Uses association.
  • The Azure app registration must hold the Graph application permission Mail.ReadWrite (admin-consented).

Node Configuration

FieldRequiredDefaultDescription
serverConfigurationyesWellKnownName of the MicrosoftGraphConfiguration entity holding AzureTenantId / ClientId / ClientSecret.
mailboxyesMailbox to poll, as a user principal name (e.g. user@company.com).
folderPathyesPath 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.
moveToFolderPathOnSuccessno(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.
pollingIntervalSecondsno120Seconds between polling cycles.
maxMessagesPerPollno25Maximum messages fetched per cycle (oldest first).
senderFilterno(none)Only process messages whose sender address contains this string.
maxAttemptsPerMessageno3Times a failing message is retried (one attempt per cycle) before it is skipped until the adapter restarts.
Graph uses non-localized folder names

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.