Need Help With Make.com Calendar Gap Detection Flow for Booking Availability

Hey All, I’ve built most of my voice assistant using Vapi + Make and it’s working great for quoting, logging leads, and handling cancellations.

Right now, I’m stuck finalizing the CheckAvailability flow for booking jobs based on real gaps in my Google Calendar.

Goal:
I want to return up to 3 realistic time slots for a given day and job type, using:

Job duration (from GPT/OpenAI)

Job-specific travel buffer

Working hours (e.g., 7 AM–4 PM)

Existing events in Google Calendar

My current Make setup includes:
Webhook from Vapi

OpenAI module to calculate job duration + buffer

Google Calendar: Search Events

I’m trying to use a JS module to detect free time gaps long enough for the job

Where I'm stuck:
I’m having trouble writing clean JS inside Make to:

Loop through the day’s events

Insert working hours as boundary blocks

Detect valid gaps (≥ duration + buffers)

Return 3 formatted time slots to Vapi

If anyone has a working example of this logic (gap detection between calendar events), or advice on how to simplify this setup — I’d massively appreciate it.

Also open to Replit or Cloudflare Worker alternatives if that’s easier to maintain long term — but would love to finish the Make version first.

Thanks in advance 🙏
Was this page helpful?