onNewEmail subscribes to messages created in the connected account’s Inbox.
Use it for inbound-mail routing, notification, and follow-up workflows.
Example
automations/process-outlook-mail.automation.ts
Options
Optionalaccount: string | IntegrationAccountReference<"microsoft">
statically selects the mailbox and defaults to the project Microsoft binding.
A runtime signal cannot select a trigger account.
Trigger data
ReturnsSignal<OutlookMessage> with messageId, subject, body, preview,
recipients, sender, timestamps, conversation and folder IDs, read/draft and
attachment state, categories, importance, flag, Focused Inbox classification,
web link, and ETag where Microsoft supplies them. Recipient arrays and
categories default to []; subject defaults to an empty string.
The trigger watches message creation in Inbox. It reports hasAttachments but
does not embed attachment data; call listAttachments with messageId to read
attachments.