cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
khanhmekong
New Member

Flow to decline back-to-back meeting

Hi,

 

I would like to create a flow that connect to O365 Outlook Calendar and do the followings:

- Whenever a new meeting is received.

- Check if that meeting is back-to-back with existing meeting which is prior or after the new meeting, meaning: there is no gap between the new meeting with meeting before or after it.

- If it is back-to-back then decline the new meeting with message "You have to leave gap between meetings"

 

How can I do this with Power Automate?

 

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
v-yiwenxie-msft
Microsoft
Microsoft

Hi @khanhmekong 

 

You could try to use Filter Query to get those events whose start time is greater than or equal to the start of the day of the start time of the newly-created event.

3.5-17.PNG

Filter Query:

Start/DateTime ge '@{startOfDay(triggerOutputs()?['body/start'])}'

 

For more info about filter query:

OData comparison operator reference - Azure Cognitive Search | Microsoft Docs

 

Best Regards,
Community Support Team _ Kira Xie
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
v-yiwenxie-msft
Microsoft
Microsoft

Hi @khanhmekong 

 

You could try the flow as below:

3.4-4.PNG

The dynamic content 'value' for 'Apply to each' is from 'Get events'.

The dynamic content for the left side 'Start time' and 'End time' is from 'Get events'.

The dynamic content for the right side 'Start time' and 'End time' is from 'When a new event is created'.

 

If you still have the problem, please feel free to let me know.

 

Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

khanhmekong
New Member

Hi @v-yiwenxie-msft ,

Thank you for the flow, I think it can do what we need.

I have question about step 'Get events': Could you guide me how to filter only events of the booking day? Because I think we don't need to get all events of the calendar.

 

Flow to decline back to back meeting.png

v-yiwenxie-msft
Microsoft
Microsoft

Hi @khanhmekong 

 

You could try to use Filter Query to get those events whose start time is greater than or equal to the start of the day of the start time of the newly-created event.

3.5-17.PNG

Filter Query:

Start/DateTime ge '@{startOfDay(triggerOutputs()?['body/start'])}'

 

For more info about filter query:

OData comparison operator reference - Azure Cognitive Search | Microsoft Docs

 

Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

khanhmekong
New Member

Hi @v-yiwenxie-msft ,

 

The flow works very well. Thanks a lot for your help!

 

Best,

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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 Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (1,355)