Handling appointment leads and follow-up with Twilio, Cal.com and AI
Needs changesWhat this workflow does
This AI workflow has 24 nodes and runs on Twilio events (com.twilio.messaging.inbound message.received) (plus 1 other trigger). Along the way it connects Twilio, OpenAI Chat Model, Airtable and HTTP Request. It also calls api.cal.com over HTTP.
How it runs
Trigger: On Twilio events (com.twilio.messaging.inbound message.received) (plus 1 other trigger).
- Check For Command Words (Switch): routes items into 1 branches
- Find Follow-Up Candidates (Airtable): search
- User Request STOP (Airtable): update
- Get Existing Chat Session (Airtable): search
- Generate Follow Up Message (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model
- Send Confirmation (Twilio): uses Twilio
- Appointment Scheduling Agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 6 tools (Cancel Booking, Create a Booking, Get Availability, Reschedule Booking…); output parser: Auto-fixing Output Parser
- Update Follow-Up Count and Date (Airtable): update
- Create/Update Session (Airtable): update
- Send Follow Up Message (Twilio): uses Twilio
…plus 1 more step. See the full node list below.
Services it uses
HTTP calls to: api.cal.com
Before you upgrade to n8n 3.0
2 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:
- HTTP Request Tool (legacy) in Get Availability, Get Existing Booking, Find Existing Booking…: replace with HTTP Request node connected to the AI Agent's Tool input.
- AI Agent v1 (old agent modes) in Appointment Scheduling Agent1 (v1.6): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| HTTP Request Tool (legacy) Get Availability, Get Existing Booking, Find Existing Booking, Reschedule Booking, Cancel Booking, Create a Booking | HTTP Request node connected to the AI Agent's Tool input |
| AI Agent v1 (old agent modes) Appointment Scheduling Agent1 (v1.6) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (11)
- Twilio Trigger
n8n-nodes-base.twilioTrigger - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Airtable
n8n-nodes-base.airtable - Twilio
n8n-nodes-base.twilio - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Switch
n8n-nodes-base.switch - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Auto-fixing Output Parser
@n8n/n8n-nodes-langchain.outputParserAutofixing - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - HTTP Request Tool
@n8n/n8n-nodes-langchain.toolHttpRequest - AI Agent
@n8n/n8n-nodes-langchain.agent
From the author
This n8n workflow builds an appointment scheduling AI agent which can Take enquiries from prospective customers and help them book an appointment by checking appointment availability Where no appointment is booked, the Agent is able to send follow-up messages…