Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Accept/decline O365 invitations based on availability


I want to build a flow which automatically accepts/declines an invitation sent to a calendar based on availability.


If the timeslot of the invitation isn't booked so far -> accept the invitation
If the timeslot is already booked and therefore not available -> decline the invitation


The issue I'm facing is that I don't know how to check for the availability of the corresponding calendar.


Bildschirmfoto 2020-11-26 um 13.32.27.png


I tried it with 'get calendar view of events' (1) and was trying to count the already existing events within the calendar by initialising a variable and count it's number by using length(variables('Event Count')) (2) but I'm not sure if that is actually working as I'm not familiar with how variables and arrays work properly.


Bildschirmfoto 2020-11-26 um 13.32.16.png

 In the end a condition should decide if the flow is accepting or declining the event (3).

Bildschirmfoto 2020-11-26 um 13.31.48.png

So how do I check if the calendar is available at the request time slot and how do I retrieve the data so that I can either accept or decline? 

Thanks in advance


Super User II
Super User II

Hi @Hkliem,


First of all I would have a look at the Find meeting times (v2) action in Power Automate. I believe that will be a good starting point to find available slots:


Let me know if you need any additional help with configuring this.

Hi @Expiscornovus ,


Thank you very much for your swift reply!

I actually considered it, but I don't know how to connect the meeting times of the invitation to the actual availability of the calendar.


Super User II
Super User II

Hi @Hkliem,


You can use dynamics values from the When a new event is created. You can populate it with the required attendees for instance.


For the start and end time you need to change the datetime format, because this action requires a different format. You can use the following expressions:

formatDateTime(triggerOutputs()?['body/start'], 'yyyy-MM-ddTHH:mm:ss')
formatDateTime(triggerOutputs()?['body/end'], 'yyyy-MM-ddTHH:mm:ss')


Helpful resources

Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (57,895)