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

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
v-yamao-msft
Community Support
Community Support

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.

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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,269)