Booking appointments
An agent can offer real times and book one while the caller is still on the line. There are two ways to give it a calendar, and which one fits depends on how much scheduling logic you need.
Which one to use
Connect Google Calendar or Microsoft 365 directly when you want the agent working against the calendar itself: read what is on it, offer the gaps inside your working hours, create and cancel appointments. Setup is one click and there is nothing else to run.
Use Cal.com when booking is a product in its own right. A calendar API gives you busy blocks and event creation; everything between them is the part that gets hard. Buffers between appointments, minimum notice, how far ahead you accept bookings, per day exceptions, holidays, two callers offered the same slot at once, reschedule links and confirmation emails. Cal.com is that layer, it syncs both ways with Google Calendar, Outlook and CalDAV, and you keep your own calendar underneath it.
The direct connections deliberately do not try to be Cal.com. They apply your working hours, your appointment length and your existing events, and nothing more.
Google Calendar and Microsoft 365
Go to Settings - Integrations, choose Google Calendar or Microsoft 365, name the connection, set your time zone and working hours, and press Connect. You approve access on the provider's own screen and land back here.
Tick every permission on the consent screen. Google gives each one its own checkbox, and a consent that leaves the calendar box unticked still returns a valid sign-in. Glytos refuses that rather than saving a connection that would fail the first time an agent used it, so you will be asked to try again.
Then, under Tools, create a tool of kind Integration, pick the connection and choose an action:
| Action | What it does |
|---|---|
check_availability | Open slots inside your working hours, clear of what is already booked. Takes a start date, and optionally an end date (a week later by default) and an appointment length in minutes (30 by default) |
list_events | What is on the calendar in a date range |
create_event | Book one of the offered slots |
cancel_event | Cancel an event by its event_id, as returned by create_event |
A Microsoft 365 connection also carries send_mail, which sends from the connected
mailbox as that person and saves a copy to their Sent items. Unlike the calendar
actions, that one can be used as an
automation, which is how you send a caller a
summary after the call ends.
Working hours are per connection: a start time, an end time, and the days as ISO numbers where 1 is Monday. The default is 1,2,3,4,5 and 09:00 to 18:00. Events you have marked "free", invitations you declined, and all-day entries do not block a slot; a tentative meeting does.
To change the time zone or working hours later, use the pencil on the connection
in Settings - Integrations. The account stays connected, and so do the
automations pointed at it. Over the API, PATCH /integrations/connections/{uuid}
with those fields in data does the same: they are merged into the connection,
and any other field, a token included, is refused. A time zone that does not
exist, a time that cannot be read, or a day outside 1 to 7 is refused when it is
saved rather than quietly replaced by the default.
A connection works on the connected account's main calendar. Other calendars, including one somebody else owns and shared with the account, are out of reach, and Cal.com is the answer for that.
Cal.com setup
- In Cal.com, create the event type you want callers to book, and set its availability, duration and buffers there.
- Copy an API key from Cal.com's settings, and the event type id (it is in the event type's URL).
- In Glytos, go to Settings - Integrations, add a Cal.com connection and give it a name that says what it books, for example "30 min consultation". Enter the API key, the event type id, and your business time zone.
- Under Tools, create a tool of kind Integration for each action, pick the
connection, and choose
check_availabilityorbook_appointment. The parameter schema is filled in for you. - Add both tools to your agent.
One connection books one event type. If you offer two different appointments, make two connections and two pairs of tools; an agent can carry both.
What the agent does
check_availability takes a start date (and optionally an end date, a week later by
default) and returns open slots, each with a label in your time zone and the exact
start value to book with. book_appointment takes that start back, plus the
caller's name and email, and optionally notes for the booking.
The agent is told to read a couple of the labels aloud rather than list everything,
and to hand start back unchanged. That split is deliberate: the model should never
do time-zone arithmetic, because it is the one thing it is confidently wrong about.
A useful prompt sounds like this:
When the caller wants an appointment, call check_availability for the day they
mention, then offer two or three of the times. Once they choose one, ask for their
full name and email, and call book_appointment with the exact start value of the
slot they picked. Confirm the day and time back to them afterwards.Limits and behaviour
- At most 12 slots are returned per check, so the model has something to offer rather than a list to read out.
- No availability is a normal answer, not an error. The agent should offer another day.
- Calendar actions are only available during a conversation. They cannot be used as an automation: booking on every finished call would create a real appointment from templated fields, every time.
- A booking made through Cal.com is created in your Cal.com account through its API, like any other booking there. Make one test booking from the Playground before you go live, and check it appears in Cal.com as you expect.
- A direct Google or Microsoft connection can lose its authorization, either because you revoked it or because the account changed. The connection then says so on the Integrations page and stops running until you connect it again. Reconnecting under the same name restores it without disturbing the tools and automations pointed at it.