Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Creating a Flow which blocks off my calendar after it is more than 50% full

(0) ShareShare
ReportReport
Posted on by 13

Hello Power Users,

 

I am currently developing a Flow which I have set to block out my calendar after my day is more than 50% populated. 

The one thing I am struggling to overcome is having it count only the time spent in meetings out of an 8-5 workday, as currently it is counting every event for that day, even if there is overlap of events on a single time slot.

Another issue is preventing an unwanted loop, where when this flow creates an event it triggers this process to run again. My solution was to have it only run if I myself haven't created the event, and also by limiting the max minutes to less than 480. Looking for other suggestions to this.

 

The steps I am having it run are:

  • When a New Event is created by someone other than myself begin the flow
  • Retrieve the event that was just created
  • Creating a startTime variable at the beginning of that event's day
  • Creating an endTime variable for the end of that event's day
  • Retrieving the calendar view of events which fall under both start and end time variable
  • creating a totalSum variable and starting it with 0
  • Running a For each condition to run through all events for that day and converting the time difference of the start and end time of the event into ticks, and then converting the ticks to minutes, incrementing the minutes of each event into totalSum
  • Putting it through a condition where if totalSum is between 300 and 480 minutes and if it's not created by myself then move to If Yes
  • If Yes the flow then triggers the event to start at the beginning of the workday and end at the end of the workday

 

maxandx_3-1710356191811.pngmaxandx_4-1710356259270.pngmaxandx_5-1710356289796.png

 

Looking for any feedback on how to solve my issue, as well as any ways I can improve this process.

 

Thanks!

Max

 

 

 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1