Microsoft Email Listener

Use this Node to poll a Microsoft 365 mailbox through Microsoft Graph and emit unread email messages into a Workflow.

Revision History

1.0.0.0 - Initial release.
1.0.0.9 - Fixed shared OAuthConnection lock handling.
0.0.0.12 - Node name correction.
0.0.0.26 - Added support for nested mailbox folder paths in the listener folder settings.

Connection

Use the Microsoft Graph Email Connection to authorize Microsoft Graph access and optionally target a specific mailbox instead of the authenticated user.

Property Type Description
Tenant Id String The Microsoft Entra ID tenant identifier, or common for a multi-tenant sign-in flow.
Client Id String The application ID from your Microsoft Entra ID app registration.
Client Secret Masked The client secret generated for the app registration.
Access Token Masked The OAuth access token returned after authorization.
Refresh Token Masked The OAuth refresh token used to renew access when Microsoft returns one.
Scopes String The OAuth scopes requested during authorization. The default is offline_access https://graph.microsoft.com/.default.
Mailbox String The optional mailbox address or UPN to monitor. Leave this empty to use the authenticated user mailbox.

Setup Notes

  • Register an application in Microsoft Entra ID with mail permissions such as Mail.Read or Mail.ReadWrite.
  • Grant admin consent when your tenant requires it, or make sure the signed-in user has already consented to the requested permissions.
  • Configure the Connection with Tenant Id, Client Id, and Client Secret, then complete the OAuth authorization flow so Access Token and Refresh Token are populated.
  • Set Mailbox only when you need to monitor a specific mailbox. Leave it empty when you want the Node to use the authenticated user mailbox.
  • Make sure the monitored, processed, and error folders already exist before you run the Node.
  • You can supply folder settings as a well-known top-level folder such as Inbox, a direct Microsoft Graph folder identifier, or a nested path such as Inbox/NewInvoices.

Methods

This Node exposes one listener method that polls a mailbox folder for unread messages and emits either one payload per email or one payload per attachment.

Listen

Use this method when you want a Workflow to react to unread Microsoft 365 email messages in one mailbox folder.

Parameter Type Description
Connection Connection The Microsoft Graph Email Connection that contains the mailbox authorization details.
MonitoredFolder String The folder to poll for unread messages. You can use a well-known folder such as Inbox, a direct Graph folder ID, or a nested path such as Inbox/NewInvoices.
ProcessedFolder String The optional folder to move successfully processed messages to. You can also use a nested path. Leave this empty when you want successful messages marked as read instead.
ErrorFolder String The optional folder to move failed messages to. You can also use a nested path. Leave this empty when you want failed messages to remain in the monitored folder.
FireMethod String Controls how the Node emits results. Use PerMessage to emit one payload per email, or PerAttachment to emit one payload per attachment.
Return Type Description
Response Array An emitted sequence of listener payloads that includes the message metadata, body content, and any attachments that were retrieved.

Usage Notes

  • The Node resolves nested folder paths one segment at a time from the mailbox root. For example, Inbox/NewInvoices resolves Inbox first and then NewInvoices below it.
  • PerMessage emits one item that contains the email details and all resolved attachments for that message.
  • PerAttachment emits one item per attachment while still including the parent email metadata on each emitted item.
  • When ProcessedFolder is empty, successful messages are marked as read instead of being moved.
  • When ErrorFolder is empty, messages that fail during payload construction remain in the monitored folder.

Known Issues

  • The listener uses a polling window of roughly 30 seconds per invocation; long-running flows may require re-triggering the node.
  • The node marks messages as read or moves them; ensure processed/error folders exist when specified.
  • Nested folder paths support / delimiters only. The Node does not perform a recursive mailbox-wide search by leaf folder name.