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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Trying to get a auto r...
Power Automate
Answered

Trying to get a auto reply working

(0) ShareShare
ReportReport
Posted on by

Dear All

 

I am New to Office 365 as a Admin. i am trying to make a Flow so i can sent out of hour replies between 8 pm to 8 am Monday to Friday and all day Saturday and Sunday.

 

I have looked here and found this one

@or(
	equals(
		dayofweek(
			UtcNow()
		),
	0),
 equals(
		dayofweek(
			UtcNow()
		),
	6),
	less(
		formatDateTime(
			addHours(
				triggerBody()?['DateTimeReceived'],-6
			),
			'HH:mm'
		),
		formatDateTime('08:00:00','HH:mm')
	),
	greater(
		formatDateTime(
			addHours(
				triggerBody()?['DateTimeReceived'],-6
			),
			'HH:mm'
		),
		formatDateTime('20:00:00','HH:mm')
	)	
)

This one does seem to always go to yes after this condition no matter what date or time tested.

 

Any help would be great

 

Step by step would be better

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @Office365newbie,

     

    Could you please share a screenshot of your flow’s configuration?

    Further, could you please explain a bit more about addHours() function in your formula that you provided?

     

    I have made a test on my side and the flow works well. My flow’s configuration as below:14.JPG

    On my side, within Condition 2 box, click “Edit in advanced mode”, type the following formula for test:

    @or(equals(dayOfWeek(utcNow()),0),equals(dayOfWeek(utcNow()),6), less(formatDateTime(addHours(triggerBody()?['DateTimeReceived'],3),'HH:mm'),formatDateTime('08:00:00','HH:mm')),greater(formatDateTime(addHours(triggerBody()?['DateTimeReceived'],3),'HH:mm'),formatDateTime('20:00:00','HH:mm')))

    The flow works successfully as below:13.JPG

     

    Please take a try to check if the syntax within your formula is correct. Besides, please check if the test date or time that you provided all satisfy the condition, if yes, please take a try to test a date or time which is not between 8 pm to 8 am Monday to Friday and all day Saturday and Sunday.

     

    Best regards,

    Kris

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 375 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 269 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 127 Most Valuable Professional

Last 30 days Overall leaderboard