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

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

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
Deyo
Level: Powered On

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

TEST

Community Support Team
Community Support Team

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

Deyo
Level: Powered On

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
kheiman
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,324)