DEV Community

Alex Wu
Alex Wu

Posted on

How We Automated a Service Business's Appointment Confirmations (No-Code + AI)

Most SMB owners I talk to are drowning in the same three tasks: scheduling, reminders, and follow-ups. They're doing all three manually — phone calls, text messages, sticky notes. And when something falls through the cracks, they lose revenue.

Last month, we helped a physiotherapy clinic automate their entire appointment confirmation workflow. Here's exactly what we built and how.


The Problem

The clinic had 40–60 appointments per week. Staff were spending about 90 minutes every day:

  • Calling patients to confirm next-day appointments
  • Sending reminder texts manually from a personal phone
  • Following up on no-shows to reschedule

The no-show rate was around 18%. Industry average is 12–15%. That gap costs real money.


The Stack

We kept it simple:

  • Cliniko — their existing booking system (has a REST API)
  • Twilio — SMS sending and receiving
  • OpenAI — handling freeform replies ("can we reschedule?" "yes but 10 mins late")
  • Anythoughts.ai agent — orchestration and state management
  • Google Sheets — audit log (the owner wanted to see everything)

Total monthly cost: ~$47/month at their volume.


How It Works

Step 1: Pull tomorrow's appointments (7 PM daily)

import requests
from datetime import datetime, timedelta

tomorrow = (datetime.now() + timedelta(days=1)).strftime("%Y-%m-%d")

response = requests.get(
    f"https://api.au1.cliniko.com/v1/appointments",
    params={"q[]": f"starts_at:>={tomorrow}T00:00:00Z"},
    auth=(CLINIKO_API_KEY, ""),
    headers={"Accept": "application/json", "User-Agent": "AnythoughtsBot/1.0"}
)

appointments = response.json()["appointments"]
Enter fullscreen mode Exit fullscreen mode

Step 2: Send personalized SMS via Twilio

from twilio.rest import Client

client = Client(TWILIO_SID, TWILIO_TOKEN)

for appt in appointments:
    patient_name = appt["patient"]["first_name"]
    time_str = format_time(appt["starts_at"])  # "9:30 AM"

    client.messages.create(
        body=f"Hi {patient_name}, confirming your appointment tomorrow at {time_str}. Reply YES to confirm or RESCHEDULE to pick a new time.",
        from_=TWILIO_NUMBER,
        to=appt["patient"]["phone"]
    )
Enter fullscreen mode Exit fullscreen mode

Step 3: Handle replies with AI

This is where it gets interesting. Patients don't reply "YES" — they reply "yep!", "works for me", "actually can we do Thursday instead?", "my knee is better, do I still need to come?"

We used a simple classifier:

import openai

def classify_reply(message_text):
    response = openai.chat.completions.create(
        model="gpt-4o-mini",  # cheap enough to run on every reply
        messages=[{
            "role": "system",
            "content": "Classify this SMS reply as: CONFIRM, RESCHEDULE, CANCEL, or UNCLEAR. Reply with just the word."
        }, {
            "role": "user", 
            "content": message_text
        }]
    )
    return response.choices[0].message.content.strip()
Enter fullscreen mode Exit fullscreen mode
  • CONFIRM → mark confirmed in Cliniko, log to Sheets
  • RESCHEDULE → send link to online booking, flag for staff
  • CANCEL → cancel in Cliniko, send cancellation confirmation
  • UNCLEAR → route to staff inbox with the original message

Step 4: No-show follow-up (30 minutes after appointment time)

If someone didn't show and didn't respond, the agent sends a second SMS:

"Hi Sarah, we missed you today. No worries — reply RESCHEDULE to book a new time or call us at [number]."


Results After 6 Weeks

  • No-show rate: 18% → 9%
  • Staff time on confirmations: 90 min/day → ~10 min/day (reviewing flagged cases)
  • Reschedules captured automatically: ~70% (previously most just ghosted)
  • Owner's comment: "I didn't realize how much mental energy this was taking until it just... stopped."

What Actually Took Time

Not the code. The code was maybe 4 hours total.

What took time:

  1. Getting Cliniko API access — they have an approval process, took 3 business days
  2. Twilio A2P 10DLC registration — required for business SMS in the US/AU, another 2 days
  3. Edge cases — patients with multiple appointments the same day, international phone numbers, appointments that staff manually blocked off

The "AI" part was genuinely the easiest bit. gpt-4o-mini at $0.15/1M input tokens classified 400 messages for about $0.02 total.


The Takeaway

If you're doing repetitive outbound communication on a schedule — confirmations, reminders, follow-ups — this is exactly the kind of workflow that pays for itself in the first week.

The formula is always the same:

  1. Pull structured data from an API
  2. Send a templated message with one clear CTA
  3. Handle the replies with a simple AI classifier
  4. Route edge cases to humans

You don't need a custom ML model. You don't need a fancy dashboard. You need a cron job, a messaging API, and 4 hours.

We built this in a weekend for the clinic. If you're an SMB owner running on manual confirmations, you're leaving money on the table.


Anythoughts.ai automates business workflows for SMBs. If you're doing something like this manually, reach out.

Top comments (0)