cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
frixel
Level: Powered On

reply mail from time to time

I want to make a Flow that reply a mail when it comes in a subfolder from the shared mailbox.

I have this but that is not working as i want.

How do i set the time that it only send a reply from15:00PM till 07:00 AM on workdays and saterday and sunday?

 

Flow1.png

 

21 REPLIES 21
Dual Super User
Dual Super User

Re: reply mail from time to time

HI @frixel 

 

So in this flow you are using two triggers one recurrence and one when an email arrives. In a flow you can only use one trigger. 

 

So what you can do is, use the trigger -> when an email arrives. get the time of the email and convert it to your timezone (currently flow uses utc time zone)

 

and then check if that time is after 15 or before 7 and the day is saturday or sunday. 

 

Please see the flow in the past solved solution for a reference:

https://powerusers.microsoft.com/t5/Building-Flows/Out-of-Office-Auto-Reply-for-off-hours-and-weeken...

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

frixel
Level: Powered On

Re: reply mail from time to time

Hi @yashag2255 

 

Thank you for the info and the link.

So far I have been able to make a flow that there will be a reply mail when mail is sent on Saturday or Sunday.

I just don't succeed with the flow below.


I want a reply mail if an email arrives between 3:00 PM and 7:00 AM the next day
What do I have to adjust?

Flow1.png

 

Dual Super User
Dual Super User

Re: reply mail from time to time

Hi @frixel , 

 

So here is the thing, for the time part, we will be getting the recieved time of the email in UTC and we can simply compare that with UTC itself. (as the time zone conversion be something similar). So what you can do is initialise a variable that will be for 3PM (15:00:00) and another one for 7AM (7:00:00) IN the initialise variable for 3PM, use this expression:

 

concat(formatDateTime(utcNow(),'yyyy-MM-dd'),'T15:00:00')

and for the variable of 7 AM use this:

 

 

concat(formatDateTime(utcNow(),'yyyy-MM-dd'),'T07:00:00')

In the if condition, put ticks(select the recieved time of outlook here) and then the operator is greater than and on the right type ticks(select the 3pm variable here)

 

 

add a row and the conditoon will be and on the left side put ticks(select the recieved time of outlook here) and then the operator is lesser than and the right side will be ticks(select the 7am variable here)

 

Expression for the left side:

 

ticks(triggerBody()?['DateTimeReceived'])

 

Please seee the screenshot below:

ssaaw.png

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

frixel
Level: Powered On

Re: reply mail from time to time

Hi @yashag2255 

 

See the error.

I think that the day tomorrow is not right?

 

Flow1.png

Dual Super User
Dual Super User

Re: reply mail from time to time

Yes. I just noticed that. For the 7 am, please modify the expression:

 

concat(formatDateTime(addDays(utcNow(),1),'yyyy-MM-dd'),'T07:00:00')

Also, I see there is some error in the condition that you have put. Can you share a screenshot of that so that we can recitfy it. 

frixel
Level: Powered On

Re: reply mail from time to time

Hi @yashag2255 

 

I don`t know what you mean with the input in the condition.

In the if condition, put ticks(select the recieved time of outlook here) and then the operator is greater than and on the right type ticks(select the 3pm variable here)

add a row and the conditoon will be and on the left side put ticks(select the recieved time of outlook here) and then the operator is lesser than and the right side will be ticks(select the 7am variable here)

Expression for the left side:

ticks(triggerBody()?['DateTimeReceived'])

 

Now i have al the same in the condition.

 

Flow1.png

Dual Super User
Dual Super User

Re: reply mail from time to time

@frixel 

 

Yes! Did you run the flow? Are you getting any error now?

frixel
Level: Powered On

Re: reply mail from time to time

Hi @yashag2255 

 

No error but it sends no email yet

 

Flow1.png

Dual Super User
Dual Super User

Re: reply mail from time to time

@frixel 

 

Can you post the expressions you are using in the conditions?

frixel
Level: Powered On

Re: reply mail from time to time

Hi @yashag2255 

 

As I reported in a few posts back, i do not understand what should be there.
I now have the same for all four, namely:

ticks(triggerBody()?['DateTimeReceived'])
 
Flow1.png
Dual Super User
Dual Super User

Re: reply mail from time to time

@frixel 

 

Did you initialise the 2 variables for the 7AM and the 3PM in your flow? if yes, 

 

In the conditions, 1st row, keep the left side as it is now. On the right side remove everything and put ticks() in the bracket, select the 3PM variable from dynamic selector.

 

For the 2nd row, keep the left side as it is now and on the right side remove everything and put ticks() and select the 7AM vqariable here. 

frixel
Level: Powered On

Re: reply mail from time to time

@yashag2255 

 

i set the times between 21:00PM and 07:00AM and i sent a mail. (on 21:45) 

I have no Reply mail

flow2.pngflow3.png

 

flow1.png

Dual Super User
Dual Super User

Re: reply mail from time to time

Hi @frixel 

IN this run history, if you click and expand the trigger and see the outputs part, you will see the Recieved Date Time value. Can you please post that screenshot here?

frixel
Level: Powered On

Re: reply mail from time to time

@yashag2255 

 

Where can i find that "expand the trigger" 😞

Dual Super User
Dual Super User

Re: reply mail from time to time

@frixel In your flow, click on the trigger and post a screenshot of that

frixel
Level: Powered On

Re: reply mail from time to time

@yashag2255 

On what part? above i have the output post with the times. That is not what you mean?

Dual Super User
Dual Super User

Re: reply mail from time to time

@frixel 

 

For the current run where you told that the email was not sent. I want to see the Recieved time of the email in the flow

output. So in the flow run output, if you click the trigger, you will see the output box and that is what i want to check.

frixel
Level: Powered On

Re: reply mail from time to time

@yashag2255 

This is what you mean?

 

Flow1.png

Dual Super User
Dual Super User

Re: reply mail from time to time

@frixel 

Not this. "When a new email arrives" this one

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,269)