New Emails between 10am & 11am move to Subfolder

Using Microsoft Outlook. If you have a need to receive an email, then to file it in a sub-folder based on 2 time parameters this method should do the trick.

Below I will demonstrate using the Flow trigger When a new email arrives then passing a condition that will return true if DateTimeReceived parameter is within the time constraint.

In Lehman's terms, if the email arrives between 10am & 11am it will be moved to the sub-folder. If not, it remains in the inbox.

This is where you apply your time constraint and please change this to suit your needs, could it be business hours or to cover the out of hours mailbox at say 8pm to 6am.

@and(greaterOrEquals(formatDateTime(triggerBody()?['DateTimeReceived'],'HH:mm:ss'), '10:00:00'),less(formatDateTime(triggerBody()?['DateTimeReceived'],'HH:mm:ss'), '11:00:00'))

You could now consider to further nest your conditions in order not to terminate the flow as a success if outwith the time constraints. The below will demonstrate how to check for the next hour of the day, between 11am & 12 mid day in my example.

So as you will see from the expression, the condition called Return True if Between 10am and 11am moves your new email to a sub-folder if between 10am & 11am. The condition Return True if Between 11am and 12 mid day will move to a sub-folder if within that time frame. Then do nothing more but leave the email in your inbox outwith 10am to 12 mid day. With up to 250 actions per Flow you could cycle through a full 24 hours of the day in one Flow and move the content to varying sub-folders to suit.

Would you like to buy Alan a coffee?

Visit the AlanPs1 Ko-fi page

Maybe you need to split what comes into an email inbox in order to allow multiple users to process the data without confusion, this could be an approach that would help you achieve that.

Alan

Do you need assistance building this Flow?

Visit the Get Help section of the Power Automate Community