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
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (3,308)