Table of Contents

When a new email arrives

Runs the Flow when a new email arrives in a Microsoft 365 mailbox.

Use this action to run a Flow when a new mail arrives in a Microsoft 365 Outlook mailbox. If you don't already have one, you need to first create a Microsoft 365 Outlook connection by logging on with an account having access to the mailbox.

img

Properties

Property Type Description
Connection Required Specifies the Microsoft 365 Outlook connection that the trigger should use to check for new emails.
Polling interval Required Specifies how often to check for new emails.
Disabled Optional Specifies if the trigger should be disabled. You may want to disable the trigger in the Development and Test environment once you have published to Production.
Filter Optional Specifies optional filters to restrict which emails to receive. See detailed description below.
Folder Optional Specifies the folder to monitor for new emails. If not specified, all folders are monitored.
Include attachments Optional Specifies whether or not to fetch the contents of all attachments when the trigger runs. Read more about this option below.
Output name Required The name of the output variable that represents the received mail message. You can change it from the default mailMessage to something that more clearly describes the received mail, for example customerFeedbackMessage.

Filter

Use filters to restrict which mail messages are returned.

Filter Description
From Specify one or more email addresses to accept messages from. To filter on multiple adresses, use semicolon as separator, for example luke.skywalker@rebellion.com;leia@rebellion.com. You can also specify partial addresses such as @outlook.com to only accept emails sent from an Outlook.com account
Subject A text contained in the subject to receive. For example, using budget version as subject filter will accept messages with the subject Final budget version 2024, while messages with subject Final version 2024 will not be accepted.
Importance Specifies the importance of the messages to accept. If no importance is selected (checked), all messages are accepted.
Only with attachments Whether or not to only accept messages with attachments.
Custom filter Lets the user specify a custom filter, for example startswith(subject, 'Hello') and isRead eq true. Read more about filters here. Note! You should not include filter= in the expression.
Search Allows you to further restrict which messages are returned. Read more about using search here.

Attachments

If Include attachments is set to false (unchecked), only metadata about any attachments in the message is included when the trigger runs. If this is the case, you need to use an additional action such as Get attachment or For each attachment, to get the actual file contents of the attachments.
If emails contains large attachments, and you don't need all of them when processing the messages, it is recommended to set the Include attachments to false, and instead selectively get attachments you need using the Get attachment action.