← All N8N workflows
AI & researchAgentAirtableChain LLMOpenAI Chat ModelOutput Parser Autofixing

💡Criteria For Follow Up Candidates

Configured with Agent, Airtable, Chain LLM, OpenAI Chat Model, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
TriggerTwilio TriggerTwilio TriggerAI & modelsOpenAI Chat Model1OpenAI Chat ModelData storeFind Follow-UpCandidatesAirtableMessagingSend Follow Up MessageTwilioData storeUpdate Follow-Up Countand DateAirtableData storeCreate/Update SessionAirtableData storeGet Existing ChatSessionAirtableTriggerEvery 24hrsSchedule TriggerMessagingSend ReplyTwilioMessagingSend ConfirmationTwilioData storeUser Request STOPAirtableRoutingCheck For Command WordsSwitchTransformStructured OutputParserOutput Parser StructuredTransformAuto-fixing OutputParserOutput Parser AutofixingAI & modelsOpenAI Chat Model2OpenAI Chat ModelAI & modelsGenerate Follow UpMessageChain LLMAI & modelsOpenAI Chat Model3OpenAI Chat ModelWeb / APIGet AvailabilityTool Http RequestWeb / APIGet Existing BookingTool Http RequestWeb / APIFind Existing BookingTool Http RequestWeb / APIReschedule BookingTool Http RequestWeb / APICancel BookingTool Http RequestWeb / APICreate a BookingTool Http RequestAI & modelsAppointment SchedulingAgent1Agent

Node categories in this workflow

  • Trigger
  • AI & models
  • Data store
  • Messaging
  • Routing
  • Transform
  • Web / API

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
Twilio TriggerTriggerTwilio TriggerSee node parameters
OpenAI Chat Model1AI & modelsOpenAI Chat ModelSee node parameters
Find Follow-Up CandidatesData storeAirtablesearch
Send Follow Up MessageMessagingTwilioSee node parameters
Update Follow-Up Count and DateData storeAirtableupdate
Create/Update SessionData storeAirtableupdate
Get Existing Chat SessionData storeAirtablesearch
Every 24hrsTriggerSchedule TriggerSee node parameters
Send ReplyMessagingTwilioSee node parameters
Send ConfirmationMessagingTwilioSee node parameters
User Request STOPData storeAirtableupdate
Check For Command WordsRoutingSwitchSee node parameters
Structured Output ParserTransformOutput Parser StructuredSee node parameters
Auto-fixing Output ParserTransformOutput Parser AutofixingSee node parameters
OpenAI Chat Model2AI & modelsOpenAI Chat ModelSee node parameters
Generate Follow Up MessageAI & modelsChain LLMSee node parameters
OpenAI Chat Model3AI & modelsOpenAI Chat ModelSee node parameters
Get AvailabilityWeb / APITool Http RequestSee node parameters
Get Existing BookingWeb / APITool Http RequestSee node parameters
Find Existing BookingWeb / APITool Http RequestSee node parameters
Reschedule BookingWeb / APITool Http RequestPOST
Cancel BookingWeb / APITool Http RequestPOST
Create a BookingWeb / APITool Http RequestPOST
Appointment Scheduling Agent1AI & modelsAgentSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • airtableTokenApi
  • calApi
  • httpHeaderAuth
  • openAiApi
  • twilioApi

Workflow notes

Step 6. Filter Open Enquiries from Airtable

Step 6. Filter Open Enquiries from Airtable

💡Criteria For Follow Up Candidates

  • No Scheduled Appointment
  • No Request to STOP
  • No Previous Follow-up in Past 3 days
  • Follow-up is less than 3 times
Step 3. Appointment Scheduling With AI

Step 3. Appointment Scheduling With AI

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.

Step 2. Check for Existing Chat History

Step 2. Check for Existing Chat History

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.

Step 1. Wait For Customer SMS

Step 1. Wait For Customer SMS

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.

Step 9. Cancelling Follow-Up Messages

Step 9. Cancelling Follow-Up Messages

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.

Step 4. Updating Airtable and Responding to the Customer

Step 4. Updating Airtable and Responding to the Customer

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.

Step 5. Following Up With Open Enquiries

Step 5. Following Up With Open Enquiries

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.

Step 7. Generating a Follow-Up Message

Step 7. Generating a Follow-Up Message

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!

Step 8. Update Follow-Up Properties and Send Message

Step 8. Update Follow-Up Properties and Send Message

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.

Try It Out!

Try It Out!

This workflow implements an appointment scheduling chatbot which is powered by an AI tools agent.

  • Workflow is triggered by Customer enquires sent via SMS
  • Customer session management and chat history are captured in Airtable to enable the SMS conversation.
  • An AI Agent is equipped to answer any questions as well as schedule, re-schedule and cancel appointments on behalf of the customer.
  • The agent's reply is sent back to the customer via SMS.
  • Additional a follow-up system is implemented to re-engage customers who haven't scheduled an appointment.

Need Help?

Join the Discord or ask in the Forum!

Happy Hacking!

Sticky Note10

You'll need to set a custom Header Auth Credential for Cal.com API v2. See the following doc for more info: https://cal.com/docs/api-reference/v2/introduction

🚨 Change EventTypeID Here!

🚨 Change EventTypeID Here!

  • EventTypeID must be a number.
  • Your event type dictates the allowed duration of the booking.
  • If Event Type set to 30mins and the agent attempts to book 60mins, this will fail so make sure the agent knows how long to set the booking for!
💡Criteria For Follow Up Candidates

💡Criteria For Follow Up Candidates

Purpose and structure

This folder contains the 💡Criteria For Follow Up Candidates workflow. Its executable nodes use agent, airtable, chainLlm, lmChatOpenAi, outputParserAutofixing, outputParserStructured, scheduleTrigger, switch, toolHttpRequest, twilio, twilioTrigger. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

Twilio Trigger, Every 24hrs

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Schedule/0539_Schedule_Twilio_Create_Webhook.json MIT; preserve source notices.

More in AI & research