Building a chatbot that books calls on my own calendar

My website now has a chat assistant named Sage that can answer a question and book a call in the same conversation. I want to walk through why I built it myself and how it decides when I’m free, because that second part is where most of the work went.
It’s also the demo for the FAQ and booking chatbot I set up for businesses. If you want to see how it behaves, the “Ask Sage” tab on the right edge of the screen opens it.
The snag with my booking page
My booking page is Fantastical Openings. It has no API, which is the hook other software uses to read or change data in an app. There’s no way for a program to ask it what times are open, and no way to create a booking through it. A chatbot could link to the page, but it couldn’t book.
The off-the-shelf website chat tools I looked at book the call right inside the chat. I wanted the same thing, under my own control.
Going around the booking page
Fantastical doesn’t own my schedule. It reads my iCloud calendars. If the chatbot reads and writes those same calendars, Fantastical sees everything the bot does.
So that’s how it’s set up. The automation runs in n8n, a tool for connecting apps, on a small server I rent from Hostinger. n8n doesn’t have a built-in connection for iCloud, so it talks to the calendar directly over CalDAV, the standard way calendar apps read and write events. It checks three of my calendars for conflicts, one work and two personal, and books only into the work one. A call booked in the chat shows up in Fantastical right away, and the Openings page won’t offer that time to anyone else.
The screen where I build and change the automation isn’t on the public internet. I can only reach it from my own devices over a private network. The only part the internet can reach is the chat itself.
Letting the AI talk, but not decide
The conversation side is Claude, Anthropic’s AI model, in its smaller and faster Haiku version. Sage introduces itself by name and says plainly that it’s an AI, not me. It talks about me in the third person.
It answers from my own website. Every night at 3:00 AM it re-reads the About, Services, How it works and FAQ pages, plus the case studies and blog indexes. When I edit the site, Sage knows the next day, and a new post like this one becomes something it can point people to. Replies are one to three sentences and usually end with one link to the page that fits best. If the answer isn’t on the site, it says so and offers a call, email or my phone number. I’d rather it hand off a question than make something up.
What I didn’t want was the AI deciding when I’m available. An AI model can still misread a question, so the AI runs the conversation and code handles the calendar and the rules. Calls are 20 minutes on weekdays, between 24 hours and 14 days out, with one upcoming booking per email address.
Events marked Busy block a time, and events marked Free, like all-day reminders, don’t. Repeating events count. If any of the three calendars can’t be read, it shows no openings at all rather than risk a double booking. Right before it writes the event, it checks once more that the slot is still open, in case something landed on the calendar during the conversation.
Phone is my preference and the default, so the chat asks for a phone number. It reads the details back and only books after the visitor confirms. It never says “you’re booked” unless the booking step says the event was actually written. Then I get a push notification on my phone through Pushover with the time, the name, how to reach them and what they want to talk about. If the notification fails, the booking still stands.
A public chat box costs money
Every message goes to a paid AI model, and a chat box on a public website is open to anyone, including someone who wants to run up my bill. So it has limits, and it only accepts requests from my own website.
The daily summary arrives every evening at 8: messages, conversations, bookings and anything that was blocked. I looked at adding a captcha, the “prove you’re human” check, and held it back on purpose. It goes in if the alerts show abuse.
Testing it against the real thing
I tested it against my real calendars. A real meeting blocked the slot that overlapped it. A test booking showed up in Fantastical. A second booking with the same email address was refused. The push notification arrived with the app closed. Then I deleted the test events.
A later test caught a gap with cancellations, and it’s now fixed and tested: if I delete a booking in Fantastical, that email address can book again, and if iCloud can’t be reached during that check, it refuses rather than guess.
Not everything has been smooth. The chat went down briefly once, because the server relied on a personal setup of mine to look up web addresses. It now has its own.
What it won’t do yet
- It doesn’t know about holidays. I block those by hand with a Busy event.
- Zoom links are manual. If someone picks Zoom, I send the link myself.
- The AI can still misread a question. That’s the reason the booking rules live in code. A misread question can mean an unhelpful answer, but it can’t put a call outside my hours or on top of another meeting.
What this means for a business
For a contractor or a front office, the details change. The rules would be your hours, how long a job takes, how much notice you need and which calendar the work goes on. The part I’d keep is the split: let the AI handle the back-and-forth with the customer, and let code decide what’s actually open.
I wrote up the build in more detail in the case study. If you’re wondering whether something like this would fit your business, book a free 20-minute call, or ask Sage to book one for you.
Header image created with Grok.