Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Suggested answer

Calendar based condition

(0) ShareShare
ReportReport
Posted on by
I have built a flow which runs with no errors flagged, but doesn't actually do the action it is designed to do, and I feel that it is the condition that is causing it to fail, but I cannot find a fix for it.
 
To summarise current flow
Trigger: When a new email is received
Condition: date contains Monday or Wednesday or Saturday or Sunday,
If true: reply to email (with body text about it being a non-working day)
If false: no action.
 
The run report comes back all green, no errors found. But also no-one is getting an out of office reply either.
This would be much easier if outlook just had this built in when you set your working hours, but as they don't can anyone help me fix the condition?
  • Michael E. Gernaey Profile Picture
    42,661 Super User 2025 Season 1 on at
    Calendar based condition
     
    What @eetuRobo says is completely legit, but I do have a follow up question.
     
    You made it sound like everything runs as if the True side gets run but no one gets the emails.
    So essentially your condition is working, that is how I read it, but if that is true, then the issue is with the reply email action and not with your condition.
     
    So as @eetuRobo mentioned, what we really need to see is the RUN itself, with the actions Opened, so we can see what you put in.
     
    I hope
    a) this helps explain the confusion so next time it will :-) be clearer easier
    b) how easy it is to have the smallest thing barf your work, but you have to remember to share it all to get better help.
  • Suggested answer
    eetuRobo Profile Picture
    3,454 Super User 2025 Season 1 on at
    Calendar based condition
    Can you show screenshot of the condition and the expression you have on it?  If you are just checking the receivedDateTime to contain "Monday" for example then it will most likely never met the condition since the receive time doesn't have the names of the days. You need to convert that datetime value to day of the week.

    Use dayOfWeek() -expression to check what day of the week. And have it be OR so it checks if today is either 1, 3 or 6 which are Monday, Wednesday or Saturday



    Expression is the same in all the rows: 
    dayOfWeek(triggerOutputs()?['body/receivedDateTime'])

    Equal to

    1 = Monday, 3 = Wednesday, 6 = Saturday

    https://learn.microsoft.com/en-us/dotnet/api/microsoft.exchange.webservices.data.dayoftheweek?view=exchange-ews-api


    Since the flow is starting right away when the email comes you could also use dayOfWeek(UtcNow()) since it should be the same as the email received date

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Automate - Building Flows

#1
David_MA Profile Picture

David_MA 385 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 330

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 330 Super User 2025 Season 1

Overall leaderboard