Urgent.News

What's breaking now, across thousands of outlets.

Tech

Adding Call Booking to My Site Chatbot Using the Cal.com API v2

I am Kaleb, a web developer running Dream Futures Tech here in Pompano Beach, Florida. On my own business website, I run a custom chatbot to handle initial questions from prospective leads. For a long time, the bot only answered text queries or told people to email me. That felt like a bottleneck. I wanted visitors to be able to check my availability, book a discovery call right inside the chat…

Kaleb is a web developer from Pompano Beach, Florida. He runs a business called Dream Futures Tech. On his website, he uses a custom chatbot to handle initial questions from prospective leads. The chatbot was initially only able to answer text queries or direct users to email him. Kaleb wanted visitors to be able to check his availability, book a discovery call within the chat window, and cancel bookings if needed, without leaving the page.

To achieve this, Kaleb integrated the Cal.com API v2 into his backend services running on his home automation server. He kept users inside the conversational flow instead of redirecting them to an external scheduling link, which he believed improved completion rates.

To set up authentication and event types, Kaleb obtained an API key from his Cal.com account and the target event type ID. He stored these values in environment variables and included them in his API requests. The v2 API uses Bearer token authentication, and the cal-api-version header must be included to avoid failures or warnings.

When a visitor asks about availability, the chatbot triggers a function to fetch open slots for the upcoming week. The v2 slots endpoint requires a start and end time in ISO format. The function fetches the available slots and returns an array of slot times for the chat UI to display as clickable buttons. Once a user selects a time slot and provides their name and email, the bot sends a POST request to create the booking.

Upon a successful response, the booking UID returned by the API is saved in the active chat session state. This UID allows the user to access their booking details if they need to make changes. If a user needs to cancel their scheduled call, the chatbot can cancel the booking by providing the booking UID or checking the active session memory. The cancellation endpoint is called with the booking UID and a cancellation reason, and the bot confirms the cancellation status.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Vibe Coding" is driving real software engineers insane

Let’s be honest about the current state of software development. Over the past few months, the tech industry has fallen in love with a new term: "Vibe Coding." People with zero engineering background…

  • "Vibe Coding" involves non-engineers generating code via AI prompts
  • Senior engineers disregard core software principles, focus on intuition
  • Real software engineers spend time fixing "vibe code" and its issues

Is my S3 bucket HIPAA compliant? The question AWS can't answer

✓ Human-authored analysis; AI used for formatting and proofreading. Recurring theme on r/aws: "I'm storing PHI in S3. I enabled encryption, turned on logging, set the bucket to private.

  • HIPAA Security Rule outlines four safeguard categories for ePHI storage.
  • AWS Key Management Service enables encryption at rest for S3 buckets.
  • Stave CLI tool assesses S3 configurations against HIPAA compliance.

More from Monday 19 October →