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

Out of Office reply when calendar event is ongoing

I'm trying to create a flow that will send an automatic Gmail reply to any email that arrives in my inbox for the whole duration of an event (with a specific title) in my Google Calendar.

 

This was my attempt:

screencapture-emea-flow-microsoft-manage-environments-eda9993d-15a8-4a34-8d5e-f3deaf5713d5-flows-new-2018-11-15-15_26_20.png

 

It works as it's supposed to, the only problem is that it runs only once after the event is started and I need it to keep running until the end of the event. Some other attemps using switches have not worked.

Thanks for the help!


1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Out of Office reply when calendar event is ongoing

Hi @nhafala,

 

Do you want to reply to an email when an email arrives while you are in a meeting?

Please try with the following configuration.

It is triggered by When an email arrives.

Then List the events on a calendar.

Add an apply to each, with in the apply to each, add a condition and enter the following code to check if the email received time is within the event duration.

 

@and

    (

     greaterorequals(triggerBody()?['DateTimeReceived'], items('Apply_to_each')?['start']),

     lessorequals(triggerBody()?['DateTimeReceived'],items('Apply_to_each')?['end'])

       )

 

Under if yes branch, reply to the email automatically.

Note: I have added two compose actions to check the return value just for testing. You could just remove them from the flow.

1.PNG2.PNG

Hope it could be your reference.

 

Best regards,

Mabel

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

Re: Out of Office reply when calendar event is ongoing

Hi @nhafala,

 

Do you want to reply to an email when an email arrives while you are in a meeting?

Please try with the following configuration.

It is triggered by When an email arrives.

Then List the events on a calendar.

Add an apply to each, with in the apply to each, add a condition and enter the following code to check if the email received time is within the event duration.

 

@and

    (

     greaterorequals(triggerBody()?['DateTimeReceived'], items('Apply_to_each')?['start']),

     lessorequals(triggerBody()?['DateTimeReceived'],items('Apply_to_each')?['end'])

       )

 

Under if yes branch, reply to the email automatically.

Note: I have added two compose actions to check the return value just for testing. You could just remove them from the flow.

1.PNG2.PNG

Hope it could be your reference.

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
nhafala
Level: Powered On

Re: Out of Office reply when calendar event is ongoing

Hi,

Thank you for your reply. I tried your suggestion but when I run a test the apply to each just keeps processing for 4 minutes and then fails. I tried it while an event was happening in my calendar.

 

 

 

 

EDIT: I tried again and it worked. I don't know what I did wrong the last time. Thanks for the help!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fourthImage

Australia Summit

Travel to Melbourne and network with thousands of peers!

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 268 members 3,698 guests
Please welcome our newest community members: