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 / Create a flow to autom...
Power Automate
Unanswered

Create a flow to automatically add a lunch break for 1 hour in Outlook 365

(2) ShareShare
ReportReport
Posted on by 19

Help please!

I thought this would be simple but having a nightmare with times and timezones in Power Automate.

 

What I'm wanting to do is create a flow that runs once a week (say on a Friday at 3pm) that creates an event for 'Lunch'  every day in the following week.

 

Rules:

  • 'Lunch' is a 60 minute block between 12:30 and 14:00 UK time (UTC)
  • Monday to Friday only
  • Where calendar availability is set to 'Free' (sometimes I have an appointment 12:30 till 13:00, which is why need to allow till 14:00)
Categories:
I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @Dom__ 

     

    so just to confirm, does the lunch time event should be block in calendar from 12:30 to 14:00 always ? as per your 3rd point, if meeting is still 13:00- should the lunch break be from 13:00 to 14:00 ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • Dom__ Profile Picture
    19 on at

    That's actually a very good point, but yes.

     

    Sometimes there's a recurring appointment from 12:30 till 13:00, so on those days I'd need the lunch to be 13:00 but other times happy for it to be 12:30 till 13:30. By running it the week ahead I can stop people putting meeting requests in over lunch, if that makes sense.

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @Dom__ 

     

    Ok what for a case when appointment may be scheduled from 12:30 to 14:00 next week ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • Dom__ Profile Picture
    19 on at

    Then do nothing please as I'd have to sort manually.

  • Dom__ Profile Picture
    19 on at

    Make sense Nived?

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @Dom__ 

     

    Yes , it make sense to me, now figuring it how best we can approach this , 

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • Dom__ Profile Picture
    19 on at

    Ok thanks. Look forward to hearing back from you, as I've been struggling with it.

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @Dom__ 

     

    Sorry for late response, is there any minimum duration u need to keep the lunch time > like 30 minutes ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • Dom__ Profile Picture
    19 on at

    I would think minimum 30 mins, max 1 hour

  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at

    Hi @Dom__ 

     

    Sorry for late response, here is the flow design 

    I am assuming that you are trying to run the flow every Friday at 12:30 pm so to set lunch break event b/w 12:30 and 14:00 

     

    A. Set a recurrence like below (set as your time zone)

    Nived_Nambiar_0-1714669538484.png

     

    B. Create a variable which holds the start date of event for next Monday 

    Nived_Nambiar_1-1714669583321.png

     

    C. Create a variable which stores end date which would be 2 hours after start date

    Nived_Nambiar_2-1714669654346.png

     

    (Both variables are initialized with Monday's start date and end dates)

     

    D. set a variable days which stores the days (like a increment counter)

    Nived_Nambiar_3-1714669757647.png

     

    E. use Do until loop which loops with condition Days >5

    Nived_Nambiar_16-1714671000117.png

     

    Below steps will be inside the loop 

    1. Use find meeting times action which helps to find meeting times availability for 60 minutes thus to determine whether any interval of 1 hour is available for putting time for lunch break b/a 12:30 and 14:00
    Nived_Nambiar_4-1714669900060.png

     

    2. Use condition which checks whether there is any output from find meetings time > in other words meant whether there is any availability for 60 min b/w 12:30 and 14:00,
    Nived_Nambiar_5-1714669998575.png

    length(outputs('Find_meeting_times_(V2)')?['body/meetingTimeSuggestions'])
     
    3. If the condition is True , Create the event for available time like below
    Nived_Nambiar_6-1714670165208.png

     

    Expression - 

    convertFromUTC(concat(first(outputs('Find_meeting_times_(V2)')?['body/meetingTimeSuggestions'])?['meetingTimeSlot/start/dateTime'],'Z'),'India Standard Time')
     
    Nived_Nambiar_7-1714670200458.png

     

    Expression - 

    convertFromUTC(concat(first(outputs('Find_meeting_times_(V2)')?['body/meetingTimeSuggestions'])?['meetingTimeSlot/end/dateTime'],'Z'),'India Standard Time')
     
    Note- i have used Indian Standard Time to convert utc time format to local time zone, for yours you can change it accordingly as per your local time zone.
     
    Also select the correct time zone from that dropdown.
     
    4. if the condition is False, it means there is no available time of duration 1 hour b/w 12:30 and 14:00. Now in no branch we will check whether the there is availability of 30 minutes b/w 12:30 and 14:00 . see below steps what will be done under No branch.
         4.1  check the meeting availability for 30 minutes b/w 12:30 to 14:00
    Nived_Nambiar_8-1714670503984.png

     

         4.2 - check whether there is meeting available for time duration for 30 minutes using condition via expression.

    Nived_Nambiar_9-1714670576844.png

     

    Expression - 

    length(outputs('Find_meeting_times_(V2)_2')?['body/meetingTimeSuggestions'])
     
         4.3- if the condition is True - Then create an event with 30 mts duration like below
    Nived_Nambiar_10-1714670670577.png

     

    Expression - 

    convertFromUTC(concat(first(outputs('Find_meeting_times_(V2)_2')?['body/meetingTimeSuggestions'])?['meetingTimeSlot/start/dateTime'],'Z'),'India Standard Time'
     
    Nived_Nambiar_17-1714671154449.png

     

    Expression - 

    convertFromUTC(concat(first(outputs('Find_meeting_times_(V2)_2')?['body/meetingTimeSuggestions'])?['meetingTimeSlot/end/dateTime'],'Z'),'India Standard Time')
     
    Note -i have used Indian Standard Time to convert utc time format to local time zone, for yours you can change it accordingly as per your local time zone.
     
     
    5. Outside these conditions, after setting the event, then increment day variable by 1
    Nived_Nambiar_13-1714670797497.png

     

    6. Now Increment start date by 1 day and update the StartDate variable as well.

    Nived_Nambiar_14-1714670852594.png

     

    7. Do same above steps for end date as well.

    Nived_Nambiar_15-1714670894210.png

     

     

     

     Hope this helps !
    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

     

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