PICKED FROM N8N.IO · LEADS & SALES

An AI agent replies to customer SMS enquiries through Twilio and books, reschedules or cancels appointments using the Cal.com API. Conversations are logged in Airtable. A daily schedule finds leads who have not booked and sends them a personalised follow-up, with limits on how often, and respects STOP requests.

Template by Jimleuk · 29.3k views on n8n.io · listed there as “Handling appointment leads and follow-up with Twilio, Cal.com and AI”

THE WORKFLOW24 NODES
TTwilio Trigger◆OpenAI ChatModel1AFind Follow-UpCandidates✆Send Follow UpMessageAUpdate Follow-UpCount and DateACreate/UpdateSessionAGet Existing ChatSession◷Every 24hrs✆Send Reply✆Send ConfirmationAUser Request STOP⑂Check For CommandWords{}Structured OutputParserOAuto-fixingOutput Parser◆OpenAI ChatModel2✦Generate FollowUp Message◆OpenAI ChatModel3TGet AvailabilityTGet ExistingBookingTFind ExistingBookingTRescheduleBookingTCancel BookingTCreate a Booking✦AppointmentScheduling Agent1
DIFFICULTY
Advanced
NODES
24
USES AI
Yes
PUBLISHED
July 2024

001 / WHAT HAPPENS

  1. 01

    A customer SMS arrives through the Twilio trigger.

  2. 02

    The number and chat history are saved or loaded in Airtable.

  3. 03

    An OpenAI agent replies and uses Cal.com tools to check availability and book, move or cancel.

  4. 04

    The reply and confirmation are sent back by SMS through Twilio.

  5. 05

    Every 24 hours, unbooked leads are found and sent an AI-written follow-up, skipping STOP requests.

WHO IT SUITS

Suits appointment-based businesses such as clinics, salons and trades that take bookings by text and want after-hours replies and gentle follow-up.

CONNECTS

  • Twilio
  • Cal.com
  • Airtable
  • OpenAI

002 / BEFORE YOU USE IT HERE

  • !Customer or lead details are sent to an overseas AI provider, which is a cross-border disclosure under APP 8 of the Privacy Act, so say so in your privacy policy.
  • !The workflow sends SMS to prospects automatically, so check consent and an opt-out under the Spam Act 2003; it does handle STOP, but test it, and consider an approval step.
  • !You need Twilio with an Australian number, Cal.com, Airtable and an OpenAI API key; the Airtable base and Cal.com event IDs must be replaced with your own.
  • !Set timezones for Cal.com bookings and the daily schedule to Australia/Sydney (or your city).

LOCAL SWAP

Swap Cal.com for Calendly by pointing the HTTP Request tool nodes at the Calendly API.

Need n8n and the AI hosted in Australia? →

004 / QUESTIONS

Anything else is quicker to answer on a call. Thirty minutes, free, with the people who would build it.

Yes. Every template on this list is free on n8n.io. You need an n8n account (n8n Cloud or self-hosted) and accounts for the apps it connects to, some of which charge for API use.

We adapt templates to your systems, add approval steps where customers are involved, host n8n in Australia when the data calls for it and hand it over documented.

Book a free call→