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

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

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.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

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.

View solution in original post

Highlighted
Frequent Visitor

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

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

Top Solution Authors
Top Kudoed Authors
Users online (10,308)