Million Dollar YearGet the free app

How to build an n8n AI agent that books calls in GoHighLevel

By Max Warnault · 23 April 2025 · 8 min read

In short

An AI scheduler in n8n is an AI agent that chats with a qualified lead and handles their calendar through the GoHighLevel API. You give it tools: update first name, email and phone, get free slots, get a contact's appointments, and book, reschedule and cancel an appointment. Each tool is an HTTP request with a clear description. The agent collects contact details first, offers open slots, books the call, and later moves or cancels it when the lead asks.

Getting a qualified lead to actually pick a time is where a lot of calls get lost. Someone says yes in a chat, and then they have to wait for you to reply, find a slot, send a link, and handle every reschedule by hand.

In this video I build an AI agent in n8n that books, reschedules and cancels appointments in GoHighLevel by chat, on autopilot. I call it the AI scheduler. It picks up where my AI setter stops: once a lead is qualified, the scheduler takes over the conversation and gets the call on the calendar.

Set up the AI scheduler workflow in n8n

I start by adding a new sticky note in n8n to keep this part separate from the rest. I label it "AI scheduler: book, reschedule, cancel calls."

I don't start from scratch. I copy the nodes from my AI setter workflow, paste them, and rename them:

  • a webhook for the scheduler
  • the AI agent, renamed AI scheduler
  • the OpenAI model and the memory
  • the tool that updates the contact's first name
  • the response output

The scheduler gets many more tools than the setter, but the response stays almost the same. I paste in the scheduler prompt I had already written and rename the webhook path to match.

Test the webhook before adding tools

To test, I use the n8n test URL. I had pinned data from the setter, so I removed it first, or the test just replays the old data.

The data the scheduler receives includes:

  • the calendar ID the calls get booked in
  • the lead score from the previous step
  • the booking page
  • the booked page (the thank you page)

On the first test, the agent replied "What's your email address?" straight away. That is not very friendly. The setter should end on a question like "Would you be open to hearing how it works?" Then the scheduler picks it back up with something like: "Awesome. Do you want to find a date here that works for you, or would you rather I send you the booking link directly?" After that it validates the contact details.

Add tools to update the contact

The agent needs a first name, an email address and a phone number before it books. I duplicate the update first name tool twice:

  • update contact first name
  • update contact email address
  • update contact phone number

In the email tool, I change the property from first name to email and let the AI define the value. Same thing for the phone number.

I tried updating all three in one tool. It didn't work. If you update the first name in GoHighLevel and there's no email address, you get an error. Keeping them as separate tools fixed it.

Get free slots from the GoHighLevel calendar

Next I open the GoHighLevel API docs. The first tool I build is get free slots. It's a GET request, so I add an HTTP request tool.

  1. Paste the URL and replace the calendar ID part with the calendar ID from the incoming data. Turn on expression mode, or it's read as plain text.
  2. Add the headers. I like to start there: the Version header, set using the fields below.
  3. There is no body. Add the query parameters start date and end date, both filled in by the AI agent.
  4. Write the tool description: get free slots for a calendar, and the start date and end date must always be in milliseconds (the Unix epoch format).

I already have the millisecond rule in my prompt, but I put it in the tool description too. The AI agent reads the tool description to know how the tool works.

In my test, the start date was today plus one day, converted to UTC, in milliseconds. The end date was now plus two days.

Get the appointments for a contact

This tool is what makes rescheduling and cancelling possible. I duplicate the get free slots tool, link it to the agent and rename it get appointments for contact.

It's a GET request with one path parameter: the contact ID. There are no query parameters. The Version header has a different value for this endpoint, so check it.

I had missed the authentication. Use GoHighLevel authentication with a sub-account, which is a location. Never use the agency. I added the same authentication to get free slots.

When a contact wants to reschedule or cancel and has more than one call, the agent uses this tool to list the calls and asks which one they mean.

Book an appointment with the API

For booking, I duplicate a tool again and point it at the create appointment endpoint. It's a POST, so I change the method.

  1. Add the Version header and the authentication.
  2. Turn on send body and use JSON.
  3. Fill the required fields using the fields below: calendar ID, location ID and contact ID (the ID passed in with the contact).
  4. Set the start time to "defined by the model" and mark it required.

The start time is the only thing we don't already know. The agent has to ask the person which date and time they want.

This endpoint expects the start time in ISO date-time format, not milliseconds. So the tool description says: book an appointment for a contact, and the start time and end time must always be in ISO date-time format. My prompt shows the conversion from milliseconds to ISO. The end time is the start time plus one hour, because a call is generally one hour.

Reschedule an appointment

I duplicate the book tool, rename it reschedule appointment, attach it to the agent and point it at update appointment. That's a PUT.

The event ID goes in the URL as a placeholder the model fills in. I define the placeholder:

  • name: event ID
  • description: ID of the appointment to be rescheduled
  • type: string

My prompt says: use get appointments for contact to find the appointment to reschedule, and always return the event ID to reschedule appointment.

The body only needs the calendar ID (the same calendar) and the new start time in ISO format. No location ID or contact ID.

Cancel an appointment

The last tool deletes an event. I duplicate the reschedule tool, rename it cancel appointment, connect it, and change the method to DELETE. It keeps the event ID placeholder and the headers. There is no body.

The full tool list is now: update first name, email and phone, get free slots, get appointments for contact, book, reschedule and cancel.

Test the AI scheduler live

I checked my contact in GoHighLevel had the lead score and the AI scheduler tag, then started chatting from my phone.

I had left the test webhook URL in place. For a live test it has to be the production URL.

Then the agent asked for my email three times. To see why, I opened the execution and checked the data and the exact prompt being passed in: name, email, phone, and the check for an empty email. That's a prompt fix for later. I played along, gave my email and then my phone number.

Next it got the free slots and offered April 24 at 2, 2:30, 3 or 3:30. It verified my contact details before booking, which is the right order: the booking sends the email and SMS confirmations. I asked for the 25th at 4 p.m. and it booked the call.

The reply confirmed a 60-minute call in my local time zone and said a meeting link was coming by email. It explained how to cancel or reschedule, shared a few resources, pointed to the thank you page and asked me to reply yes to confirm I'd attend.

Rescheduling and cancelling by chat

I typed "reschedule." It got the appointment and the free slots, then moved the call to 2 p.m. without asking me. I don't want that. But I was testing the API, and the API worked. The flow gets fixed in the prompt.

Then I typed "cancel." It asked if I'd like to reschedule instead. I said no, just cancel it, and it confirmed the cancellation. Confirmation steps like that go in the prompt, so the conversation flows the way you want.

How the AI setter hands leads to the AI scheduler

When the AI setter has qualified a lead and the lead score is above five, it tags the contact AI scheduler. That tag triggers the scheduler automation, and the AI setter tag is removed. The leads get qualified and booked with no one touching the chat.

This is the kind of system we build at Million Dollar Year: code that keeps working while you sleep, without hiring anyone to answer chats.

Key takeaways

  • Copy your existing AI setter nodes in n8n and rename them for the scheduler so you don't start from scratch.
  • Use separate tools to update first name, email and phone in GoHighLevel, because a single combined update throws an error when the email is missing.
  • Write the required date format in each tool's description: milliseconds for get free slots, ISO date-time for booking and rescheduling.
  • Authenticate every GoHighLevel request with a sub-account (location), never the agency.
  • Have the agent call get appointments for contact before rescheduling or cancelling, and always pass the event ID along.
  • Test the API tools first, then fix the conversation flow, like confirmation steps, in the prompt.

Questions and answers

How do I make an n8n AI agent book appointments in GoHighLevel?

Give the AI agent HTTP request tools that call the GoHighLevel API. The booking tool is a POST to create appointment, with calendar ID, location ID and contact ID filled from your data. The start time is defined by the model after it asks the person when they want the call.

What date format does the GoHighLevel API need for free slots and bookings?

Get free slots takes start and end dates in milliseconds. Create appointment and update appointment take start and end times in ISO date-time format. I put the format in each tool's description and in the prompt so the agent converts it correctly.

How does the AI agent reschedule or cancel a call?

It first uses get appointments for contact to find the call. If there's more than one, it lists them and asks which one. Then it passes the event ID to the reschedule tool (a PUT with the new start time) or the cancel tool (a DELETE with no body).

Why does my n8n agent work in testing but not with real chats?

Check that you swapped the test webhook URL for the live one. While I was testing, I'd left the test URL in place, so real messages didn't reach the workflow. Also remove any pinned data before running a test.

When does the AI scheduler take over from the AI setter?

Once the AI setter has qualified the lead and the lead score is above five, it tags the contact AI scheduler. That tag triggers the scheduler automation, and the AI setter tag is removed.

For 6-figure coaches and agencies

Build a million dollar business, solo, with systems and AI.

Start with the free app: your year planned down to today, your numbers in one place, and exactly what your goal takes.

Get the free app

Free · No card · On the web and on your iPhone