web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Creating a Flow which ...
Power Automate
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

 

 

 

Categories:
I have the same question (0)

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard