cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

When Item is Created during after hours send an email.

I need a flow to trigger when an item is created but only send an email during certain business hours... example from 18:00 current day till 08:00 next morning.  How can I do this?

 

Michael

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: When Item is Created during after hours send an email.

Hi @Deyo,

 

Has your problem been solved?

Do you want to trigger Flow when there is a new item created, but only when the time is in the business hours--send an email notification?

I have a idea here, and maybe it could be a method.

Store "18,19,20,21,22,23,23,00,01,02,03,04,05,06,07" in an Compose-input. Because of the hourly part, you don't need to put "08" into this string.

Get the value of the Hour part of  "Created"( Item creation time) or utcNow(), determine if it is included in this array.

If Compose-Output contains this value, the message is sent.

Image reference:

58.PNG

Please take a try and also look forward to your approach.

 

Best Regards,

Barry

Community Support Team _ Barry
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

4 REPLIES 4
Highlighted
Frequent Visitor

Re: When Item is Created during after hours send an email.

TEST

Highlighted
Community Support
Community Support

Re: When Item is Created during after hours send an email.

Hi @Deyo,

 

Has your problem been solved?

Do you want to trigger Flow when there is a new item created, but only when the time is in the business hours--send an email notification?

I have a idea here, and maybe it could be a method.

Store "18,19,20,21,22,23,23,00,01,02,03,04,05,06,07" in an Compose-input. Because of the hourly part, you don't need to put "08" into this string.

Get the value of the Hour part of  "Created"( Item creation time) or utcNow(), determine if it is included in this array.

If Compose-Output contains this value, the message is sent.

Image reference:

58.PNG

Please take a try and also look forward to your approach.

 

Best Regards,

Barry

Community Support Team _ Barry
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

Highlighted
Frequent Visitor

Re: When Item is Created during after hours send an email.

This worked great... just working through the adjustment of time zone versus UTC time.  Thank you so much!

Highlighted
Frequent Visitor

Re: When Item is Created during after hours send an email.

alternatively you could use the flow management connector to

1. have a flow that turns on your 'after hours' flow at the appropriate time 

2. have the 'after hours' flow that does what it is supposed to do regardless of time because it should only be enabled after hours

3. have a flow that turns OFF your 'after hours' flow at the appropriate time

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (7,806)