cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Trying to get a auto reply working

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

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

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

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-xida-msft
Community Support
Community Support

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

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (50,662)