web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Email forwarding based...
Power Automate
Suggested Answer

Email forwarding based on Employee time schedule

(0) ShareShare
ReportReport
Posted on by
I have a scheduled e-mail forwarding project. one of our employe works between 11am to 4:30 pm . before 11 am and after 4:30 pm I would like to forward the emails to another employee outsie of this schedule .

I created power automate for this purpose . my flow is ;
 
1-when email arrives to certain email box .
2- condition ( true ) 
int(formatDateTime(convertTimeZone(triggerOutputs()?['body/receivedDateTime'], 'UTC', 'Eastern Standard Time'), 'HH'))     > 1 am 
 
int(formatDateTime(convertTimeZone(triggerOutputs()?['body/receivedDateTime'], 'UTC', 'Eastern Standard Time'), 'HH'))   <11 am 
 
forward an email version 2  ( second employee address  ) 

the flow runs successfully but it does not work . The problem could be with the date& time function . I dont know how to debug each line of flow 
 
is this the only way to accomplish this or e any other solution to this project.

I tried to get eastern time standard function as well . I tried to do it with exact time but if the solution is between 00:01 am to 11:30 am would be better solution . iam attaching the flow that I have .
Thanks for the reply 
 
flow.JPG
Categories:
  • Suggested answer
    David_MA Profile Picture
    15,701 Super User 2026 Season 2 on at
    Sorry, but the image you uploaded is rather useless since you don't show how you configured anything. Try setting it up like this:



    The expression in the compose action is convertTimeZone(utcNow(),'UTC', 'Eastern Standard Time', 'HHmm'). This includes the minutes, because you said you want to set the logic to be after 4:30 PM. The expression returns the hour value in 24-hour format, so that is 1630. The same expression is used in the condition, which just converts the output of the compose action to a number: int(outputs('Compose')).
     
    The yes side will be what you want to do when it is between 11 AM and 4:30 PM. The no side will be for what you want to do outside those hours.

    For debugging, put your expressions in a Compose action like I did. This way, you can see what is returned from a flow run. I just ran the flow, and the expression returns, which is 1:54 PM Eastern Standard Time:


    You have some conflicting information in your post as to the timeframe for the logic. Just keep in mind that converting the Compose action to an int in the condition is going to truncate the leading zero. So one minute past midnight will return 1 and 9:30 a.m. will return 930. When you hit 10 a.m., it will return four-digit numbers 1015 for 10:15 a.m. and 1100 for 11:00 a.m.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 298 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard