Twilio Two-Way Appointment Confirm and Reschedule
Sends an appointment reminder via Twilio asking the customer to reply CONFIRM, RESCHEDULE, or CANCEL; an inbound webhook handler updates the appointment in Dataverse, emails staff on a reschedule or cancel, and texts the customer an instant confirmation. Cuts no-shows with interactive SMS instead of a one-way reminder.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This solution makes appointment reminders interactive over SMS using Twilio. A daily flow texts customers a reminder asking them to reply CONFIRM, RESCHEDULE, or CANCEL; a second flow receives the inbound reply through a webhook, updates the appointment status in Dataverse, emails staff when a customer wants to reschedule or cancel, and texts the customer an instant confirmation.
Why it matters: A one-way reminder doesn't capture intent. Two-way SMS lets customers act in seconds - cutting no-shows and the manual phone tag that comes with rescheduling.
Built and shipped Off (demo). Going live requires only connection authorization, environment-variable values, and pointing the Twilio inbound webhook at the reply-handler flow's URL.
Use Case
A clinic, advisory practice, or service team wants reminders that customers can act on by text - confirming, rescheduling, or cancelling - with the appointment record and staff updated automatically. Built as two flows in one solution so the outbound reminder and the inbound reply handling stay decoupled and independently maintainable.
Flow Architecture
Flow 1: Day Before Reminder
Recurrence (daily 09:00 ET)Outbound reminder flow
Initialize variables + window
Initialize Variable + ComposeTable name, Twilio sender, lookahead days, status labels, and the now -> now+lookahead window
List Upcoming Appointments
Dataverse ListRecordsRows in window with status = Scheduled
Apply to each Appointment
Foreach (concurrency 1)Compose the interactive reminder text
Send Reminder SMS
Twilio SendMessageText asking CONFIRM / RESCHEDULE / CANCEL
Update Appointment Sent
Compose + Dataverse UpdateRecordMarks the row ConfirmationSent and stores the SID + correlation id
Flow 2: When Twilio Reply Received
Request (Twilio inbound webhook, form-encoded)Inbound reply handler
Parse reply + map action
Initialize Variable + ComposeCustomer phone, uppercased keyword, notify email, match window; map keyword to Confirm/Reschedule/Cancel/Unknown
List Matching Appointments
Dataverse ListRecordsSoonest active appointment for this phone in the window
Switch On Keyword
Switch + Dataverse UpdateRecord + Outlook SendEmailV2Confirm -> Confirmed; Reschedule -> RescheduleRequested + staff email; Cancel -> Cancelled + staff email; default -> ask to resend
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_TwilioFromNumber | String | +15551234567 | Verified Twilio sender number |
| flowlibs_AppointmentTable | String | flowlibs_smsappointments | Appointment table entity-set name |
| flowlibs_AppointmentNotifyEmail | String | scheduling@yourcompany.com | Fallback staff email for reschedule/cancel alerts |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Twilio | shared_twilio | SendMessage |
| Microsoft Dataverse | shared_commondataserviceforapps | ListRecords UpdateRecord |
| Office 365 Outlook | shared_office365 | SendEmailV2 |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Bookings integration
- On a reschedule, query Microsoft Bookings for real open slots and text them back to the customer.
- Waitlist
- On a cancel, offer the freed slot to a waitlisted customer.
- Localized
- Translate the reminder/auto-reply into the customer's language (e.g. via the Translator SMS service).
- Reminder cadence
- Change the Recurrence schedule and varLookaheadDays to remind further ahead or multiple times.
- Staff channel
- Swap the Outlook notification for a Teams message if the team prefers a channel.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Reply keyword
Uppercased, trimmed inbound reply
EXPR.02Phone match (within window)
Soonest active appointment for this phone
EXPR.03TwiML reply
TwiML auto-reply returned to Twilio
Customize & download
Generate a ready-to-import copy of this solution with your environment-variable values baked in — available on Base, Pro, or Team.
Upgrade to customize
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.