cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Community Support
Community Support

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
Frequent Visitor

TEST

Community Support
Community Support

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

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

Frequent Visitor

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
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (68,332)