Module Detail
The Fetch Free Slots module lets your agent pull a list of open appointment times from a GoHighLevel calendar before booking anything. Use it alongside the Book Appointment tool to give prospects a choice of slots rather than guessing.Setup
1. Add and Configure the Module
- Open Modules → Fetch Free Slots → Add
- Calendar ID: Paste the ID from GoHighLevel
- In GHL: Settings → Calendars
- Open the calendar
- Copy the ID from the URL
- Paste into module configuration
- Click Save
2. Attach to Agent as Tool
- Edit the agent
- Click Add Tool → Module → Fetch Free Slots
- Leave async OFF (agent needs the response)
- Save
Variables the Agent Can Send
start_date (Required)
ISO 8601 date that begins the search window Format:YYYY-MM-DDExample:
2025-01-15
end_date (Optional)
ISO 8601 date that ends the window Format:YYYY-MM-DDExample:
2025-01-20
Note: Omit this to fetch only the start_date
timezone (Optional)
IANA zone such asAmerica/New_York
Default: Uses agent’s default timezone if omitted
Examples:
America/New_YorkAmerica/Los_AngelesEurope/LondonAustralia/Sydney
Prompt Template
Conversation Examples
Example 1: Single Day
User: “Have you got anything tomorrow afternoon?” Agent: Runs fetch_free_slots with start_date = 2025-01-16, no end_date, and timezone = America/New_York Agent: “Tomorrow I’m free at 14:00, 14:30, 15:00, 15:30, 16:00, and 16:30. Which works best?” User: “Let’s go 3 pm.” Agent: Calls Book Appointment with that slot and confirmsExample 2: Multiple Days
User: “What do you have available this week?” Agent: Runs fetch_free_slots with start_date = 2025-01-15, end_date = 2025-01-19 Agent: “I have openings on:- Monday: 10am, 2pm, 4pm
- Tuesday: 9am, 1pm, 3pm
- Wednesday: 11am, 2pm
- Thursday: 10am, 4pm
- Friday: 9am, 1pm
Example 3: Next Available
User: “When’s your next available slot?” Agent: Runs fetch_free_slots for today and tomorrow Agent: “My next available is today at 4:30pm, or tomorrow at 9am. Either of those work?” User: “Tomorrow at 9” Agent: Books appointmentBest Practices
Always Fetch Before Booking
Don’t offer times without checking first. This avoids the agent suggesting slots that are already taken.Single-Day Queries
If you only ever offer single-day choices, skipend_date:
Keep Response Short and Readable
Line up times with commas or bullet points for clarity: Good:Handle No Availability
Response Format
The module returns an array of available time slots:Common Use Cases
1. General Appointment Booking
2. Rescheduling
3. Next Available Slot
4. Date Range Browsing
Advanced: Dynamic Scheduling
Buffer for Prep Time
If you need 2-hour notice for appointments:Business Hours Only
Configure in GoHighLevel calendar settings:- Working hours
- Buffers between appointments
- Blackout dates
Multiple Service Types
If you offer different service durations:Troubleshooting
No Slots Returned
- Calendar might be full - check GHL calendar directly
- Date range in the past - verify start_date is future
- Outside working hours - check calendar business hours
- Wrong calendar ID - verify ID is correct
Wrong Timezone
- Specify timezone explicitly in the request
- Don’t rely on default - always pass timezone for accuracy
- Use IANA format: “America/New_York” not “EST”
Too Many Slots
- Narrow the date range - single day instead of week
- Filter in prompt: “Show only morning slots” or “Only afternoons”
Slots Don’t Match Manual Check
- Cache lag - GHL updates may take 30-60 seconds
- Different calendar - verify you’re checking same calendar
- Timezone mismatch - slots shown in different timezone
Performance Tips
Cache Results
For chatbots, store fetched slots for 5-10 minutes to avoid redundant API calls:Limit Range
Don’t fetch more than 7 days at once unless necessary:- Faster API response
- Easier for user to digest
- Reduces token usage in agent response
Next Steps
- Use with Book Appointment to complete the booking
- Combine with Get Booked Appointments to show existing bookings
- Set up Cancel or Reschedule for flexibility

