Clinic triage and scheduling workflow

Build an AI medical workflow that handles patient triage, scheduling, and emergency routing using Vapi workflows.

Overview

Build an AI-powered clinic receptionist workflow that handles patient triage, appointment scheduling, and emergency routing using Vapi workflows with medical protocol compliance and safety monitoring.

What You’ll Build:

  • Medical triage assessment with symptom-based routing
  • Emergency detection with global safety protocols
  • Provider scheduling with urgency prioritization
  • Prescription refill processing with safety checks

Prerequisites

  • A Vapi account.
  • Medical triage protocols and guidelines.
  • Healthcare provider scheduling system.

Scenario

We will be creating a triage and scheduling workflow for Riverside Family Clinic, a primary care practice that wants to improve patient access while ensuring appropriate care routing and emergency response through sophisticated workflow automation.

Final Workflow

Clinic triage workflow showing patient verification, medical assessment nodes, emergency routing, and appointment scheduling
Complete medical triage and scheduling workflow with emergency detection, symptom assessment, and clinical routing

1. Create a Knowledge Base

3

Upload the spreadsheets

  • Click Choose file. Upload all four CSV files: patients.csv, providers.csv, triage_protocols.csv, and appointments.csv.
  • Note the file IDs. We’ll need them later to create tools.

2. Create Required Tools

Before building the workflow, create the necessary tools in your dashboard:

2

Create Patient Lookup Tool

Click Create Tool and configure:

  • Tool Name: “Patient Lookup”
  • Tool Type: “Function”
  • Function Name: lookup_patient
  • Description: “Look up patient record by ID”
  • Parameters:
    • patient_id (string, required): Patient’s ID number
  • Server URL: https://jsonplaceholder.typicode.com/users

This example uses JSONPlaceholder for demonstration. In production, replace with your EHR system API (Epic, Cerner, etc.).

3

Create Triage Assessment Tool

Create another tool:

  • Tool Name: “Triage Assessment”
  • Function Name: conduct_triage
  • Description: “Assess patient symptoms and determine urgency level”
  • Parameters:
    • symptoms (string): Description of patient symptoms
    • onset (string): When symptoms started
    • severity (string): Severity level (1-10)
  • Server URL: https://jsonplaceholder.typicode.com/posts

This example uses JSONPlaceholder for demonstration. Replace with your medical triage system in production.

4

Create Appointment Scheduling Tool

Create a third tool:

  • Tool Name: “Schedule Appointment”
  • Function Name: schedule_appointment
  • Description: “Schedule patient appointments based on availability”
  • Parameters:
    • patient_id (string): Patient identifier
    • appointment_type (string): Type of appointment needed
    • urgency_level (string): Urgency classification
  • Server URL: https://jsonplaceholder.typicode.com/posts

This example uses JSONPlaceholder for demonstration. In production, integrate with your appointment scheduling system.


3. Create a Workflow

1

Open the Vapi Dashboard

Go to dashboard.vapi.ai and log in to your account.

3

Create a new workflow

  • Click Create Workflow.
  • Enter workflow name: Clinic Triage & Scheduling Workflow.
  • Select the default template (includes Call Start node).
  • Click “Create Workflow”.
4

Configure Medical Workflow Settings

  • Configure workflow variables for patient data and medical information
  • Set up emergency routing capabilities
  • Enable HIPAA-compliant settings if required

4. Build the Workflow

You’ll start with a default template that includes a “Call Start” node. We’ll modify the existing nodes and add new ones to create our medical triage and scheduling workflow.

1

Configure the Initial Conversation Node

The default template includes a conversation node. Click on it and configure:

First Message
Thank you for calling Riverside Family Clinic. This is your virtual assistant. I can help you schedule appointments, address medical concerns, or direct you to emergency care. How can I help you today?
Prompt
You are a professional medical assistant for Riverside Family Clinic.
Listen carefully to determine the caller's purpose:
- "emergency" for life-threatening situations
- "medical_triage" for symptom assessment
- "appointment" for scheduling needs
- "prescription" for refill requests
- "general" for other inquiries
Always prioritize patient safety and follow medical protocols. Keep responses under 35 words.

Extract Variables:

  • Variable: call_purpose
  • Type: String
  • Description: Primary purpose of the patient's call
  • Enum Values: emergency, medical_triage, appointment, prescription, general
2

Add Patient Verification Node

Click the + button below the greeting node and add a new Conversation node:

Condition
Call purpose identified
First Message
I'll need to verify your information first. Please provide your patient ID, date of birth, or full name so I can access your medical record.
Prompt
You are collecting patient identification for medical record access.
Get patient ID, date of birth, or full name for verification.
Be professional and reassuring about medical privacy.
Follow HIPAA protocols. Keep responses under 25 words.

Extract Variables:

  • Variable: patient_id
  • Type: String
  • Description: Patient's ID number if provided

  • Variable: patient_name
  • Type: String
  • Description: Patient's full name if provided

  • Variable: date_of_birth
  • Type: String
  • Description: Patient's date of birth if provided
3

Add Patient Lookup Tool Node

Add a Tool node:

Condition
Patient information collected

Select Tool: Choose your pre-configured patient lookup tool from the dropdown. This tool will use the extracted patient information to find their medical record.

4

Add Call Purpose Routing Logic

Create branching paths based on the patient’s call purpose. Add multiple conversation nodes:

Emergency Routing Node:

Condition
Patient verified and purpose is emergency
First Message
I understand this is an emergency. For immediate life-threatening situations, please hang up and call 911 now. For urgent medical needs, I'm connecting you to our triage nurse immediately.
Prompt
You are handling a medical emergency call.
Direct to 911 for life-threatening emergencies.
Transfer to triage nurse for urgent medical situations.
Be calm, clear, and immediate in your response.

Medical Triage Node:

Condition
Patient verified and purpose is medical_triage
First Message
I'll help assess your medical concerns. Please describe your main symptoms, when they started, and how severe they are on a scale of 1 to 10.
Prompt
You are conducting initial medical triage assessment.
Collect symptoms, onset time, severity, and related factors.
Follow medical assessment protocols. Be thorough but efficient.
Keep responses under 30 words.

Appointment Scheduling Node:

Condition
Patient verified and purpose is appointment
First Message
I'll help you schedule an appointment. What type of visit do you need - routine check-up, follow-up, or consultation for a specific concern?
Prompt
You are helping schedule a medical appointment.
Determine appointment type, urgency, and preferred timing.
Be helpful and accommodating. Keep responses under 25 words.
5

Add Global Emergency Detection Node

Create a global node that monitors for emergency keywords throughout the call:

Condition
Emergency keywords detected or life-threatening symptoms mentioned

Node Name: emergency_detector Global Node: enabled = true Enter Condition: {{ emergency_keywords_detected == true or red_flag_symptoms == true }}

First Message
I'm hearing some concerning symptoms. For your safety, I need to direct you to immediate medical care. Please call 911 or go to your nearest emergency room right away. Do not drive yourself - have someone else drive you or call an ambulance.
Prompt
You are handling a medical emergency situation.
Direct them to emergency services immediately. Be clear and calm.
Do not provide medical advice beyond directing to emergency care.
Keep the message brief but urgent.

This global node will activate whenever emergency keywords are detected, regardless of where they are in the workflow.

6

Add Triage Assessment Flow

For the medical triage path, add these nodes:

Symptom Collection Node:

Condition
Initial symptoms described

Node Name: collect_symptoms

First Message
Thank you for that information. On a scale of 1 to 10, how would you rate your pain or discomfort? And have you tried anything to help with these symptoms?
Prompt
You are collecting detailed symptom information for medical triage.
Get pain scale, duration, what makes it better/worse, and any self-treatment.
Follow medical assessment protocols. Keep responses under 30 words.

Extract Variables:

  • Variable: symptom_details
  • Type: String
  • Description: Detailed symptom description

  • Variable: pain_scale
  • Type: String
  • Description: Pain level 1-10

  • Variable: symptom_duration
  • Type: String
  • Description: How long symptoms have been present

Triage Protocol Tool Node:

Condition
Comprehensive symptoms collected
  • Add a Tool node that calls triage protocol API with symptom data

Urgency Classification Node:

Condition
Triage assessment completed

Node Name: classify_urgency

First Message
Based on your symptoms, I'm going to classify this as [urgency level] and connect you with the appropriate care level.
Prompt
You are communicating the triage classification results to the patient.
Explain the urgency level and next steps clearly.
Be reassuring while maintaining clinical accuracy.
Keep responses under 35 words.
  • Determine urgency level: emergency, urgent, semi-urgent, routine
  • Route to appropriate care level
7

Add Provider Availability Flow

Provider Lookup Tool Node:

Condition
Urgency level determined and provider needed
  • Add a Tool node that checks available appointments based on urgency and specialty

Appointment Options Node:

Condition
Provider availability checked

Node Name: present_appointment_options

First Message
Based on your needs, I have these available appointment times with Dr. [Provider Name]. Which option works best for your schedule?
Prompt
You are presenting available medical appointments to the patient.
Present 2-3 time options clearly with provider names.
Consider urgency when offering times. Keep responses under 35 words.
  • Present available time slots to patient
  • Use conditional logic based on urgency level

Appointment Confirmation Node:

Condition
Appointment time selected

Node Name: confirm_appointment

First Message
Perfect! Let me confirm your appointment with Dr. [Provider] on [date] at [time]. Please arrive 15 minutes early for check-in.
Prompt
You are confirming medical appointment details.
Confirm provider, date, time, and location.
Provide pre-appointment instructions if needed.
Keep responses under 30 words.
  • Confirm appointment details and provide instructions
8

Add Emergency Routing Options

911 Routing Node:

Condition
Life-threatening emergency detected

Node Type: Transfer Destination: 911

  • Use for life-threatening emergencies

Urgent Care Transfer Node:

Condition
Urgent but not life-threatening situation

Node Type: Transfer Destination: +1-555-URGENT-1 (urgent care line)

Nurse Line Transfer Node:

Condition
Clinical consultation needed

Node Type: Transfer Destination: +1-555-NURSE-1 (triage nurse line)

End Call Node:

Condition
Patient needs resolved or transferred appropriately

Node Type: Hangup

  • Use when patient needs are resolved

5. Configure Phone Number

2

Create or Import Phone Number

  • Click Create Phone Number for a new Vapi number, or
  • Click Import Phone Number to use your existing clinic number
3

Configure Inbound Settings

Workflow: Select your Clinic Triage & Scheduling Workflow

Medical Configuration:

  • Enable call recording for medical documentation
  • Set maximum call duration (e.g., 20 minutes for complex cases)
  • Configure voicemail for after-hours calls
  • Enable emergency transfer capabilities
4

Test Medical Scenarios

Test the workflow with various medical scenarios:

  • Routine appointment requests
  • Urgent symptom assessments
  • Emergency situations (test routing only)
  • Prescription refill requests
  • After-hours calls

Integrating with Real Systems

This example uses JSONPlaceholder for demonstration purposes. To integrate with your actual healthcare systems:

EHR System Integration

Appointment Scheduling

Medical Decision Support

HIPAA Compliance: When integrating with real healthcare systems, ensure all integrations comply with HIPAA regulations and your organization’s privacy policies.

Next Steps

Just like that, you’ve built a medical triage and scheduling workflow that can handle patient calls, assess symptoms, and route to appropriate care levels with 24/7 availability.

Consider reading the following guides to further enhance your workflow:

  • Custom Tools - Create custom tools for EHR integration and medical protocols.
  • Custom Voices - Customize your assistant’s voice for medical professionalism.
  • HIPAA Compliance - Ensure your medical workflows meet HIPAA requirements.