Skip to main content
Clever Ops

Case studyReal job

How we built AI email and phone agents around Zanda

We built three things on one database for a practice that runs on Zanda.

  • ZandaPractice management
  • GmailThe admin inbox
  • ClaudeSorting and drafting
  • SlackApprovals and messages
  • ElevenLabsThe phone agent
  • SupabaseThe one database

The emails, callers and enquiries in the film are made up, and every screen shows sample data.

Transcript

This is a made-up email reaching software we built for an allied health practice in Australia. The system has read it, sorted it and drafted a reply. Now it waits. It only goes out when someone on the team reads it and clicks Approve and send.

The enquiry came in through the form on our website. Admin work was outgrowing the admin team, and the owner didn't want to keep hiring to keep up. The brief was to automate the repetitive work without replacing the reception team.

Enquiries came in by email, web form, fax and phone. They were tracked by hand in a shared spreadsheet, some details were typed again into Zanda, and only the owner reliably checked every channel. When reception was busy, callers ended up in voicemail.

We built three things on one database. The first is an email agent. Every ninety seconds it reads the admin inbox, skips staff mail and automated senders, sorts each email by what it's about, and drafts a reply. Staff can approve it, edit it first, pass it to the practice manager, or choose not to send. The approved words go out from the practice's own Gmail, on the same thread.

The second is a phone message taker. Calls the team can't get to, and calls after hours, go to an AI assistant. It says it's an AI and that the call is recorded, then asks for a name, the best number to call back on and a short reason. It doesn't book or answer questions. Reception gets the message by email and in Slack, and a person calls back.

The third is an enquiry CRM. Emails and calls land on one record per person, and each enquiry moves through stages, from first contact to booked and attended. People still do the parts that need judgement. Someone on the team approves every reply, reception returns the calls, and the team books appointments in Zanda.

Now the detail. Zanda's API is in beta. It lets us read client profiles, practitioners, locations and appointments, and it allows a hundred requests a minute for each key. So every part of our system shares one budget under that limit. We keep a copy in Supabase. Our system reads from Zanda and doesn't write back. It calls six of Zanda's endpoints, and the notes endpoint isn't one.

Before any email text reaches a model, fixed patterns replace Medicare, DVA and provider numbers. Claude then sorts it and writes the draft. It works from the practice's own past replies, found by a vector search in Supabase. Before they were stored, a Claude pass replaced the names of people outside the practice, phone numbers, emails and street addresses with placeholders, and a pattern pass did the same for phones and emails. It's also given facts from the Zanda copy. Anything staff should confirm goes on the review card as a check, not into the email.

The approval is tied to the exact words. The system stores a fingerprint of the approved text and checks it again at send time, so if the text has changed, the send is refused. If Gmail doesn't confirm a send, it isn't retried. Staff are asked whether it went. Sending without approval is switched off in the code, not in a setting.

On the phone side, the practice's Telair system diverts unanswered and after-hours calls to a Twilio number. ElevenLabs Agents takes the call. When it ends, ElevenLabs sends a signed webhook to our service. We check the signature, drop duplicates, and save the reception email and Slack card as jobs in the database before sending them. The email carries the message, not the transcript.

The hard part was keeping each piece narrow. The phone assistant takes three things and stops. The email agent drafts, and a person decides. Emails on sensitive topics skip the draft and go straight to a person.

The email and phone agents went live in August 2026, and the CRM in October. All three are in use on working days. Follow-up sequences and automatic sending are built, but not switched on. We didn't measure admin time beforehand, so there's no before and after to show you.

If your practice runs on Zanda and the inbox and phones are getting ahead of your admin team, get in touch.

An email agent reads the admin inbox and drafts replies, and a person on the team approves each one before it's sent from the practice's Gmail. A phone message taker answers the calls reception can't get to and passes each message to reception. An enquiry CRM keeps one record per person, with each enquiry moving through stages.

How and why they came

The enquiry came in through the form on our website. Admin work was outgrowing the practice's admin team, and the owner didn't want to keep hiring to keep up. The brief was to automate the repetitive work without replacing the reception team.

The problem

  • Enquiries arrived by email, web form, fax and phone.
  • They were tracked by hand in a shared spreadsheet, and some details were typed again into Zanda.
  • The owner was the only person who reliably checked every channel.
  • When reception was busy, callers ended up in voicemail.

What we built

  1. 1
    Claude

    An email agent

    Every ninety seconds it reads the admin inbox. It skips staff mail, automated senders and threads that have already been answered. Claude sorts each email by what it's about and drafts a reply in the practice's voice. The draft waits on an Approvals screen in the CRM, and in Slack.

  2. 2

    Approval by a person

    Staff can approve a draft, edit it first, pass it to the practice manager, file it as done, or choose not to send it. An approved reply goes out from the practice's own Gmail, on the same thread as the email it answers.

  3. 3
    TwilioElevenLabs

    A phone message taker

    Calls reception can't get to, and calls after hours, go to an AI assistant. It says it's an AI and that the call is recorded, then asks for a name, the best number to call back on and a short reason. It doesn't book appointments or answer questions about the practice. Reception gets the message by email and as a Slack card with the recording.

  4. 4
    Supabase

    An enquiry CRM

    Emails and calls land on one record per person. Each enquiry moves through stages: Enquiry, Contacted, Waiting on Client, Booked, Attended and Closed. Staff work from screens for Today, Approvals, Calls and the Pipeline.

The approval step in the CRM, on a copy with sample data

  • A drafted reply waiting for a person to approve it.

    The CRM, run locally on a copy. Sample data.

  • After Approve & send, the next draft comes up.

    The CRM, run locally on a copy. Sample data; sending is simulated.

  • A fact to confirm, shown on the review card, not in the email.

    The CRM, run locally on a copy. Sample data.

  • Phone messages the assistant took, waiting for a call back.

    The CRM, run locally on a copy. Sample data.

What a person still does

Someone on the team approves every reply before it's sent. Reception returns the calls. The team books appointments in Zanda, and anything the draft couldn't verify is checked by the person approving it.

The technical detail

What each system allowed

Zanda

  • Zanda's public API is in beta.1
  • It gives read access to client profiles, practitioners, locations, appointments, billable items and forms, with an API key in the X-API-Key header, and it allows 100 requests per key in a rolling 60 seconds.2
  • So every part of our system shares one request budget that stays under that limit.
  • We keep a copy of what we read in Supabase, the drafting works from that copy, and the system doesn't write to Zanda.
  • Our Zanda client calls six read endpoints: client profiles, practitioners, locations, appointments, billable items and forms.
  • Zanda's documentation also lists a notes endpoint, and our system doesn't call it.2
  • From forms it keeps only each form's name, type, status, client and dates.

Gmail

  • For a reply to join a thread, Gmail needs the thread's id on the message, References and In-Reply-To headers set to the RFC 2822 standard, and a matching subject.1
  • Each approved reply is built that way, so it lands under the client's email in the practice's mailbox.

Documentation

  1. 1Managing threads

Slack

  • When someone clicks a button on a Slack message, Slack sends the click to the app's request URL.1
  • Each request is signed with a secret unique to the app.2
  • Our service checks that signature before it acts on an approval.

Telair, Twilio and ElevenLabs Agents

  • Telair's hosted phone system can pass a call that rings out to an external number, and its day and night conditions divert calls when the usual answer point is unattended.1
  • Here those calls go to a Twilio number.
  • ElevenLabs can import a Twilio number, configures it itself, and lets you assign an agent to take its inbound calls.2
  • After a call, ElevenLabs sends a post-call webhook with the conversation data, signed with an HMAC signature, and can retry a webhook that fails.3

Supabase and OpenAI

  • pgvector is a Postgres extension for storing embeddings and searching by vector similarity.1
  • The practice's past replies are embedded with OpenAI's text-embedding-3-large, shortened with its dimensions setting, and stored that way.2
  • Before they were stored, each email and reply went through a Claude pass that replaced the names of people outside the practice with placeholders, along with phone numbers, email addresses, street addresses, dates of birth, claim and reference numbers and dollar amounts, and removed quoted history and signatures.
  • A fixed pattern pass for phone numbers and email addresses ran after it.

Documentation

  1. 1pgvector
  2. 2Embeddings

Vendor links checked 15 November 2026.

Design decisions

  • A person approves every reply

    Sending without approval is switched off by a constant in the code, not by a setting, so turning it on would take a code change.

  • Identifiers out before any model

    Fixed patterns replace Medicare card numbers, Medicare provider numbers and DVA file numbers with tokens before any email text reaches a model. The original email stays in the practice's Gmail.

  • Drafts from the practice's own replies

    A vector search finds the closest past exchanges in the same category, and Claude narrows them down before drafting.

  • Facts from Zanda, checks on the card

    The drafter is given facts read from the Zanda copy. Anything the approver should confirm is lifted out of the email and shown on the review card as Check before sending.

  • The approval is tied to the words

    The system stores a fingerprint of the approved text and checks it again at send time. If the text has changed, the send is refused.

  • No guessing on a send

    If Gmail doesn't confirm a send, the system doesn't retry it, and staff are asked whether it went.

  • Approved means sent

    The approved reply is sent at the moment of approval, from the text that was approved. No AI draft sits half-finished in Gmail.

The hard parts

  • Keeping each piece narrow

    The phone assistant takes three things and stops. The email agent drafts, and a person decides. Emails on sensitive topics skip the draft and go straight to a person.

  • Not losing a message

    On the phone side, each finished call is saved before anything is sent, duplicate webhooks are dropped, and the reception email and Slack card are saved as jobs in the database and sent from there. The reception email carries the captured details, not the transcript.

Where it stands

Live since

August 2026

  • The email and phone agents went live in August 2026 and the CRM in October 2026.
  • All three are in use on working days.
  • In progressFollow-up sequences and automatic sending are built but not switched on.

We didn't measure admin time before it went in, so there's no before and after figure on this page.

Questions

Can an AI draft our practice's email replies without sending them on its own?

On this job, yes. Every draft waits on an approval screen, and it's only sent when someone on the team approves it. Sending without approval is switched off in the code.

Can it connect to Zanda?

Through Zanda's API, which is in beta. On this job the system reads client profiles, practitioners, locations and appointments into its own copy, and it doesn't write to Zanda.

Will callers know they're talking to an AI?

On this job the assistant says so at the start of the call, along with the fact that the call is recorded, before it asks for anything.

Can the AI phone assistant book appointments?

Not on this job. It takes a name, a number and a short reason, and reception calls back and books in Zanda.

What happens to Medicare numbers in an email?

Fixed patterns replace Medicare, provider and DVA numbers with tokens before any text is sent to a model. The original email stays in the practice's Gmail.

Running a practice on Zanda?

Book Free Assessment

Product names and logos belong to their owners and are shown to identify the systems connected.