Skip to main content

What it does

The agent passes it your location’s opening and closing time for a given day (start_date and end_date, in local time), and the workflow returns the slots that are free in your Google Calendar within that window, already worked out. The agent has nothing left to calculate: it just offers them to the customer. Each slot in the free_slots list comes with three fields, all in local time:
If the day is fully booked or the location is closed, the list comes back empty. It’s a during-call workflow: the agent runs it mid-conversation and waits for the result before carrying on.

How it works

What you need

Getting started

1

Copy the template

From the Workflows section, open the template catalog and copy it. The workflow is created disabled. It can also be created directly from the Appointment management (Google Calendar) agent template.
2

Set up the calendar

In the Find calendar availability step, add your Google Calendar connection and select the calendar where you want appointments to be created later on.
3

Check the time zone

Europe/Madrid appears in three places: the Input Time Zone field of Format start date and Format end date (they convert to UTC before querying the calendar) and the timezone input of the Calculate free slots step (it returns the slots in local time). If you operate in a different time zone, change all three. Daylight saving time is handled automatically.The Return Response message names Europe/Madrid too: update it so the agent isn’t told a time zone that isn’t yours.
4

Publish the workflow

Publish the workflow.
5

Assign it to the agent

Add it from the agent’s Workflows section. The workflow’s name is the tool name the agent sees, so leave it as check_availability. This step isn’t needed if the workflow was created from the agent.

Before publishing

  • The workflow only reads. Creating the appointment is handled by create_appointment.
  • It’s fixed to a single calendar. For multiple locations with separate schedules, duplicate the workflow.
  • The free slots are worked out within the hours the agent passes in, not your location’s real hours. If the agent sends the wrong opening or closing time, the list comes back wrong: the hours live in the agent’s prompt, not in the workflow.
  • The workflow doesn’t know how long the appointment is: it returns whole slots. Checking that the appointment fits inside a slot is down to the agent’s prompt.
  • The Return Response step tells the agent the slots already come in local time and that it shouldn’t apply any correction. If you edit that message, keep that instruction: without it the agent may shift the hours again.

Next Steps

Appointment management (Google Calendar)

The agent that uses this workflow.

During-call workflows

If you want to modify the workflow’s steps.