Skip to main content

Microsoft Outlook Trigger

Type ID: microsoftOutlookTrigger  ·  Kind: Trigger  ·  Trigger style: poll  ·  Trace: CHAIN

Polls the Microsoft Graph API on an interval and triggers the workflow when new Outlook emails matching the configured filters are received.

Credentials

Microsoft Outlook

Properties

PropertyKeyTypeRequiredDefaultPossible valuesShown when
Poll IntervalpollIntervalMsnumberYes60000Interval in milliseconds to check for new emails (minimum 60 seconds)Always
EventeventoptionsYesmessageReceivedmessageReceived (Message Received)Always
OutputoutputoptionsNosimplesimple (Simplified), raw (Raw), fields (Select Included Fields)Always
FieldsfieldscheckboxYes[]bccRecipients, body, bodyPreview, categories, ccRecipients, changeKey, conversationId, createdDateTime, flag, from, hasAttachments, importance, inferenceClassification, internetMessageId, isDeliveryReceiptRequested, isDraft, isRead, isReadReceiptRequested, lastModifiedDateTime, parentFolderId, receivedDateTime, replyTo, sender, sentDateTime, subject, toRecipients, webLinkoutput = fields
FiltersfiltersobjectNo{}See sub-tableAlways
OptionsoptionsobjectNo{}See sub-tableAlways

filters (object)

PropertyKeyTypeRequiredDefaultPossible values
Only UnreadonlyUnreadbooleanNotrueOnly trigger on unread emails
SendersenderstringNo''Email address or name to match
Subject ContainssubjectContainsstringNo''Text the subject must contain
FolderfolderstringNoInboxMail folder to monitor

options (object)

PropertyKeyTypeRequiredDefaultPossible values
Mark as ReadmarkAsReadbooleanNofalseMark emails as read after triggering
Max Emails Per PollmaxEmailsnumberNo10Max emails processed per poll (clamped to 1-50)

Notes

Fires via poll(). Uses a stateless time window: each poll queries messages with receivedDateTime gt <now - pollIntervalMs> (ISO), ordered receivedDateTime desc. The $filter is built from isRead eq false (when onlyUnread), a sender clause matching either from/emailAddress/address or from/emailAddress/name, and the date bound. $select depends on output: a fixed common field set for simple, the chosen keys for fields, and no $select for raw. The endpoint is /messages, or /mailFolders/<folder>/messages when folder is set to anything other than Inbox.

subjectContains is applied client-side (Graph cannot combine $filter with $search on message collections); when set, the fetch limit is raised to 50 and results are trimmed back to maxEmails after filtering. simple output maps each message to a flattened object (id, conversationId, subject, bodyPreview, from, fromName, to, receivedDateTime, categories, hasAttachments, isRead, webLink); raw/fields return the message as received. If markAsRead is set, each message is PATCHed with isRead: true (failures logged, not fatal).

When no messages match, the node returns null and the workflow does not trigger. Otherwise it emits one item whose json contains emails (array) and a summary with count, subjects, senders, pollInterval, and polledAt.

The trigger() method delegates to poll(). When used as a non-root internal node, execute() returns a wait item on the poll channel.