Bookings Overbooking and Double-Book Alert
On a short schedule, the flow checks Microsoft Bookings for staff double-bookings, back-to-back appointments without buffer, and bookings exceeding daily capacity, and alerts the manager and affected staff in Teams to resolve before the conflict happens. Prevents scheduling errors that damage customer experience.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow proactively prevents scheduling errors in Microsoft Bookings. On a short schedule it scans upcoming appointments for staff double-bookings, back-to-back appointments without a buffer, and days that exceed a staff member's capacity, then alerts the manager and the team in Microsoft Teams and by Outlook email so conflicts are resolved before the appointment day arrives.
Why it matters: Double-bookings and over-capacity days damage customer experience and stress staff. Catching them on a 30-minute cadence lets the team fix the schedule proactively rather than discovering the clash at the door.
Status: Built. Solution: FlowLibs - Bookings Overbooking and Double-Book Alert. Flow ships Off (demo).
Architecture note - connector-first with a documented Graph fallback: The Microsoft Bookings connector (shared_microsoftbookings) is trigger-only plus an admin list call. Its live swagger exposes only webhook triggers (CreateAppointment / UpdateAppointment / CancelAppointment), ListBookingsBusinessUserAsAdmin, and DeleteWebhook. There is no GetAppointments and no ListStaff action, so a scheduled "read all upcoming appointments and compare them" pattern cannot be done with the connector alone. The flow still uses the Bookings connector (ListBookingsBusinessUserAsAdmin, which validates the connection) and uses Microsoft Graph via the built-in HTTP action only for the reads the connector lacks (calendarView for appointments, staffMembers for staff). Teams and Outlook use their standard connectors. Graph credentials are bound to flowlibs_ environment variables - never inlined.
Use Case
A services team (clinics, salons, advisory desks, field services) runs everything through Microsoft Bookings. They want an early-warning system that surfaces scheduling conflicts - overlaps for the same staff member, gaps smaller than the required turnaround buffer, and any staff member booked beyond their daily limit - and routes those to the people who can fix them.
Flow Architecture
Every_30_Minutes
Recurrence (30 min)Runs the conflict scan on a short cadence.
Init varBusinessSmtp ... Init varConflictText
Initialize Variable (x13)Bind all environment variables to flow variables; seed varConflictCount (0) and varConflictText (empty).
List_Bookings_Businesses
Bookings ListBookingsBusinessUserAsAdminLists the booking businesses the connection administers (validates the Bookings connection).
Get_Appointments
HTTP GET (Graph calendarView, AAD OAuth)Reads upcoming appointments in the lookahead window.
Get_Staff
HTTP GET (Graph staffMembers, AAD OAuth)Reads staff members for the capacity check.
For_Each_Appointment -> For_Each_Other -> Check_Conflict
Foreach (sequential) + ConditionCompares every appointment pair; flags shared-staff overlaps and insufficient buffers; increments varConflictCount and appends a line to varConflictText.
For_Each_Staff_Capacity -> Filter_Today_For_Staff -> Check_Capacity
Foreach (sequential) + Filter array + ConditionCounts each staff member's appointments for today and flags any over their configured daily capacity.
Condition_Has_Conflicts -> Post_To_Teams and Send_Email
Condition + Teams PostMessageToConversation + Outlook SendEmailV2If any conflict was found, alert the channel and email the manager (High importance).
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_BookingsBusinessId | String | contoso@contoso.onmicrosoft.com | Bookings business id (mailbox SMTP) to scan. |
| flowlibs_BufferMinutes | String | 15 | Minimum required gap (minutes) between a staff member's appointments. |
| flowlibs_DailyCapacityMap | String | {} | JSON map of staffMemberId -> max appointments per day. |
| flowlibs_LookaheadDays | String | 2 | Days ahead to scan for conflicts. |
| flowlibs_GraphBaseUrl | String | https://graph.microsoft.com | Microsoft Graph base URL. |
| flowlibs_ManagerEmail | String | alerts@yourcompany.com | Manager email that receives the alert. |
| flowlibs_TeamsGroupId | String | <your-team-id> | Teams team (group) id for the alert channel. |
| flowlibs_TeamsChannelId | String | <your-channel-id> | Teams channel id for the alert. |
| flowlibs_TenantId | String | <your-tenant-id> | Entra tenant id for Graph OAuth. |
| flowlibs_GraphClientId |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Microsoft Bookings | shared_microsoftbookings | ListBookingsBusinessUserAsAdmin |
| Microsoft Teams | shared_teams | PostMessageToConversation |
| Office 365 Outlook | shared_office365 | SendEmailV2 |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Auto-resolve
- Propose alternate reschedule slots for each conflict (query staff free/busy and include suggestions in the alert).
- Per-service buffer rules
- Replace the single BufferMinutes with a per-service map, keyed by serviceId.
- PTO awareness
- Cross-check appointments against staff Outlook out-of-office to flag bookings on time-off.
- Per-calendar-day capacity
- The capacity check counts today's appointments; extend it to evaluate every day in the lookahead window.
- Event-driven variant
- Swap the Recurrence trigger for the Bookings CreateAppointment/UpdateAppointment webhook trigger to check at booking time.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Shared staff (overlap candidate)
Detects two appointments sharing a staff member.
EXPR.02Overlap / insufficient buffer
With A ordered before B, conflict when B starts before A's end + buffer.
EXPR.03Today's appointments for a staff member (Filter array)
Filters to one staffer's appointments today.
EXPR.04Over capacity
Flags a staffer booked beyond their daily limit.
EXPR.05Graph calendarView URI
Reads appointments across the lookahead window.
Customize & download
Generate a ready-to-import copy of this solution with your environment-variable values baked in — available on Base, Pro, or Team.
Upgrade to customize
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.