n8n workflow template · 24 nodes · Twilio
Handling Appointment Leads and Follow-up With Twilio, Cal.com and AI is a free n8n workflow template that starts from the Twilio Trigger node and works with Twilio, OpenAI and Airtable. It has 24 nodes, 13 of them AI nodes (OpenAI Chat Model, Structured Output Parser, Auto-fixing Output Parser and Basic LLM Chain). The notes inside the workflow say: “Join the Discord or ask in the Forum!” To run it, you add your own credentials for Airtable API, Cal.com API, HTTP Header Auth, OpenAI API and Twilio API.
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
Join the Discord or ask in the Forum!
Read more about Twilio trigger
For this workflow, we'll use the twilio SMS trigger to receive enquiries from customers looking to book a PC or laptop repair.
Since we'll be working with SMS, we'll have a check to see if the customer wishes to STOP any further follow-up messages. This is an optional step that we'll get to later.
Read more about using scheduled trigger
The second half of this workflow deals with identifying customers who have engaged our chatbot but have not yet confirmed an appointment. We intend to send a follow-up message asking if the enquiry is still valid and encourage an appointment to be made with the customer.
If the customer messages the bot with the word STOP, we'll update our customer record in Airtable which will prevent further follow-ups from being trigger. A confirmation message is sent after to the customer.
Read more about using Airtable
We're using Airtable for customer session management and to capture chat history. Airtable is an ideal choice because it acts as a persistent database with a flexible API which could prove essential for further extension.
We'll pull any previous chat history and pass this to our agent to continue the conversation.
Read more about Basic LLM Chain
With our session and chat history retrieved from Airtable, we can simple ask our AI to generate a nicely worded follow-up message to re-engage the customer.
Where the logic is linear, the Basic LLM chain is suitable for many workflows. An agent is not always required!
Learn about using AI Agents
Using an AI Agent is a powerful way to simplify and enhance workflows using the latest in AI technology. Our appointment scheduling agent is equipped to converse with the customer and all the necessary tools to schedule, re-schedule and cancel appointments.
Using the HTTP Tool node, it's easy to connect to third party API services to perform actions. In this workflow, we're calling the Cal.com API to handle scheduling events.
Read more about using Twilio
Finally, we'll update our follow-up activity as part of the customer record in Airtable. Keeping track of the number of times we follow-up helps prevent spamming the customer unnecessarily.
The follow-up message is sent via Twilio and includes instruction to disable further follow-up messages using the keyword STOP.
Read more about using Twilio
Once the agent formulates a response, we can update our appointment table accordingly ensuring the conversation at any stage is captured.
If no appointment is scheduled, we can move onto the second half of this workflow which covers following up with prospective customers and their enquiries.
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
You'll need to set a custom Header Auth Credential for Cal.com API v2. See the following doc for more info
The 24 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:
Configure your own credentials after importing. Create each credential in n8n, then select it in the node.
Do you need somewhere to run it? Read our guide to self-hosted n8n.
We can adapt this workflow to your apps, data and process, then deploy and support it.
Contact Us