Build Your First Workflow — Appointment Reminder
Create an automated appointment reminder workflow that contacts members via SMS and handles rescheduling requests.
Build Your First Workflow — Appointment Reminder
What You'll Accomplish
By the end of this tutorial, you'll have a working appointment reminder system that automatically sends SMS reminders to members before their scheduled appointments. When a member replies, your AI agent handles confirmation, rescheduling requests, or cancellations — and routes complex situations to your team.
What You'll Need
- A Gravity Rail workspace
- A phone number with SMS enabled (see Step 1)
- Members in your workspace with upcoming appointments
- A workflow for handling reminder conversations (you'll build this)
Step 1: Set Up a Phone Number for SMS
Your reminder system needs a phone number to send and receive text messages.
- Go to Channels > Phone Numbers
- Click Add Phone Number
- Configure the number:
- Name: "Appointment Reminders"
- Enable SMS: Yes
- Enable Voice: Optional (enable if you also want voice reminders)
- Skip the Default Workflow for now — you'll connect it in Step 4
For full phone number setup details, see the Phone & Voice guide.
Step 2: Create an Appointment Form
You need a form to store appointment data so your workflow knows when and where each appointment is.
-
Go to Knowledge > Forms
-
Click Create Form
-
Configure the form:
- Name: "Appointments"
- Slug:
appointments - Collection: Enabled (members can have multiple appointments)
- Prompt: "Collect appointment details including date, time, provider, and location."
-
Add these fields:
| Field Name | Type | Slug | Required |
|---|---|---|---|
| Appointment Date | Date & Time | appointment_date | Yes |
| Provider Name | Text | provider_name | Yes |
| Location | Text | location | No |
| Appointment Type | Dropdown | appointment_type | Yes |
| Status | Dropdown | status | Yes |
-
For the Appointment Type dropdown, add options like: "New Patient Visit", "Follow-Up", "Annual Physical", "Lab Work", "Specialist Consultation"
-
For the Status dropdown, add: "Scheduled", "Confirmed", "Cancelled", "Rescheduled", "No Show"
For more on forms, see the Forms guide.
Step 3: Build the Reminder Workflow
Now create the workflow that handles the reminder conversation.
Create the workflow
- Go to Workflows and click Create Workflow
- Name it "Appointment Reminder"
- Assign your agent
Add the tasks
Create the following tasks and connect them:
Task 1: Send Reminder (Starting Task)
- Name: "Send Reminder"
- Prompt:
You are an appointment reminder assistant. The member has an upcoming appointment. Introduce yourself, state the appointment details, and ask the member to confirm, reschedule, or cancel. Be friendly and professional. Appointment details: - Date: {{member.collections.appointments.latest.data.appointment_date}} - Provider: {{member.collections.appointments.latest.data.provider_name}} - Location: {{member.collections.appointments.latest.data.location}} - Type: {{member.collections.appointments.latest.data.appointment_type}} - Goal: "Member has confirmed, requested rescheduling, or cancelled"
- Sub-Tasks: Confirm Appointment, Reschedule, Cancel
Task 2: Confirm Appointment
- Name: "Confirm Appointment"
- Prompt: "The member has confirmed their appointment. Thank them and remind them of anything they need to bring (insurance card, ID, relevant medical records). Wish them well."
- Goal: "Confirmation message delivered"
Task 3: Reschedule
- Name: "Reschedule"
- Prompt: "The member wants to reschedule. Collect their preferred new date and time. Let them know someone from the office will confirm the new appointment. Be helpful and accommodating."
- Goal: "New preferred date and time collected"
- Data Types: Attach the Appointments form so the agent can update the record
Task 4: Cancel
- Name: "Cancel"
- Prompt: "The member wants to cancel. Ask if there's a reason (optional). Let them know the cancellation is noted and they can call to reschedule anytime. Be understanding and professional."
- Goal: "Cancellation acknowledged"
Connect the tasks
Use the visual Task Flow editor to connect:
- Send Reminder > Confirm Appointment
- Send Reminder > Reschedule
- Send Reminder > Cancel
Set "Send Reminder" as the Starting Task.
For more on workflow creation, see the Workflows guide.
Step 4: Connect the Workflow to Your Phone Number
Link the workflow to your SMS number so replies are handled automatically.
- Go to Channels > Phone Numbers
- Open the phone number you created in Step 1
- Set the Default Workflow to "Appointment Reminder"
- Save
Now when a member replies to a reminder SMS, the workflow picks up the conversation.
Step 5: Create the Send SMS Action
Set up the action that sends the initial reminder message.
- Go to Actions and click New Action
- Configure:
- Trigger: Task Entered, targeting the "Send Reminder" task
- Action Type: Send SMS
- Phone Number: The number from Step 1
- Message: Use template variables for personalization:
Hi {{member.first_name}}, this is a reminder about your {{member.collections.appointments.latest.data.appointment_type}} appointment on {{member.collections.appointments.latest.data.appointment_date}} with {{member.collections.appointments.latest.data.provider_name}}. Reply CONFIRM, RESCHEDULE, or CANCEL.
For more on SMS actions, see the Send SMS Action guide.
Step 6: Schedule the Reminder Event
Create a scheduled event that triggers reminders at the right time.
- Go to Events and click New Event
- Configure:
- Schedule Type: CRON
- CRON Expression:
0 9 * * *(daily at 9 AM) - Targeting: Member Filter — create a filter for members with appointments in the next 24-48 hours
- Attach the Send SMS action from Step 5
- Save and activate the event
Build the member filter
In the Members view, create a saved filter:
- Filter by members who have appointment records
- Use conditions to match appointments within your reminder window
For details on filters, see Member Filters. For scheduling options, see Scheduled Events.
Step 7: Set Up Escalation (Optional)
For rescheduling requests that need staff attention, add an action to notify your team.
- Go to Actions and click New Action
- Configure:
- Trigger: Task Entered, targeting the "Reschedule" task
- Action Type: Member Notify
- Recipients: Your scheduling team
- Message: "{{member.name}} has requested to reschedule their appointment."
This ensures your team sees rescheduling requests promptly while the AI handles the immediate conversation.
Confirm the Result
-
Test with a member. Create a test member with an appointment record, then manually run the scheduled event to trigger a reminder. Verify the SMS is sent.
-
Reply to the SMS. Text back "confirm", "reschedule", or "cancel" and verify the AI handles each path correctly.
-
Check the Chats view. Go to Chats and filter by the "Appointment Reminder" workflow to see all reminder conversations.
-
Review appointment data. Check that the Appointments form records are updated when members confirm or cancel.
If SMS messages aren't being sent, verify the phone number is active, SMS is enabled, and the action is correctly attached to the workflow task.
What's Next
- Add voice reminders. Enable voice on your phone number and create a Phone Call Action for members who don't respond to SMS.
- Multi-step reminders. Schedule a second reminder 2 hours before the appointment for members who haven't confirmed. Use a Delayed Action or a second scheduled event with a filter for unconfirmed appointments.
- Integrate with your calendar. Add the Calendar Booking ability to let members reschedule directly through the conversation.
- Track no-shows. Create an action that labels members who don't respond and updates their appointment status to "No Show" after the appointment time passes.
Related Resources
Send an HTML Email Campaign with AI-Powered Reply Handling
Build a complete email campaign with personalized HTML emails and AI-powered reply handling.
Build an AI-Powered Knowledge Base from Your Document Library
Upload a document library, enable semantic indexing, and configure your AI agent to search and reference the content during conversations.
Create a Conversational Form — Patient Intake
Build an AI-powered patient intake workflow that collects demographic, insurance, and medical history information through natural conversation.
All Guides
Browse all available guides