Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.morf.health/docs/llms.txt

Use this file to discover all available pages before exploring further.

This doc is for anyone building workflows that send communications around appointments — reminders, cancellation follow-ups, or post-appointment review requests. Appointment communication in Morf is flexible: you control exactly when messages fire and what conditions have to be true first. Use the expressions below to build a workflow that fits your practice needs.

Filter by event type

Use this when you want the workflow to run only when an appointment is booked or changed, not on every appointment event.
morf_event_type.contains("SCHEDULED") || morf_event_type.contains("UPDATED")
Use these sample prompts with Flo to generate a CEL expression that fits your goals.
Only run this workflow when an appointment is scheduled or updated.
Continue when an appointment is done.

Check the appointment is still in the future

Use this when you want to make sure you’re not sending a reminder for an appointment that has already passed.
appointment_datetime.isAfter(morf.now())
Use these sample prompts with Flo to generate a CEL expression that fits your goals.
Only send this reminder if the appointment hasn't already happened.
Skip this appointment if the appointment date has already passed.

Filter to a specific time window

Use this when you want to send a reminder a specific amount of time before an appointment — like 24 hours before or 7 days before. Start here — common time windows: More than 7 days away:
appointment_datetime.isAfter(morf.now().add(parseDuration("167h")))
Within 24 hours:
morf.now().isAfter(appointment_datetime.sub(parseDuration("24h")))
Within 1 hour:
morf.now().isAfter(appointment_datetime.sub(parseDuration("1h")))
Duration reference:
WindowExpression
10 minutesparseDuration("10m")
1 hourparseDuration("1h")
24 hoursparseDuration("24h")
3 daysparseDuration("72h")
7 daysparseDuration("168h")
30 daysparseDuration("720h")
Days don’t have a shortcut. Write hours instead: 3 days = "72h", 7 days = "168h". If you use "7d", the expression won’t work.
Use these sample prompts with Flo to generate a CEL expression that fits your goals.
Write a filter that passes only if the appointment is between 24 and 72 hours from now.
I want to send a reminder when there are exactly 7 days until the appointment.
I want to send a review request a day after the appointment is complete.

Timezone-aware time windows

Use this when your patients are in different time zones and you want the reminder timing to respect their local time — for example, only sending if the appointment is more than 72 hours away as of 9 AM in their timezone. Advanced — use only if basic time windows aren’t precise enough for your needs:
appointment_updated_at.isBefore(
  parseTimestamp(
    appointment_datetime.customFormatInTimezone("2006-01-02", appointment_patient_timezone_identifier.orValue("America/Phoenix"))
    + "T09:00:00"
    + appointment_timezone_offset
  ).sub(parseDuration("72h"))
)
Annotated breakdown:
appointment_updated_at.isBefore(           // Was the appointment updated before the cutoff?
  parseTimestamp(                          // Convert the cutoff string back to a timestamp
    appointment_datetime
      .customFormatInTimezone(             // Format the date in the patient's local timezone
        "2006-01-02",
        appointment_patient_timezone_identifier.orValue("America/Phoenix")
      )
    + "T09:00:00"                          // Anchor to 9:00 AM local time
    + appointment_timezone_offset          // Apply the UTC offset for that timezone
  ).sub(parseDuration("72h"))             // Go back 72 hours from that 9 AM point
)
Replace "America/Phoenix" with the appropriate default timezone for your patient population, and change "T09:00:00" to the local time you want to anchor to. appointment_patient_timezone_identifier is populated automatically by Healthie.
Use these sample prompts with Flo to generate a CEL expression that fits your goals.
Write a filter that checks if the appointment is more than 72 hours away, anchored to 9 AM in the patient's timezone.
Only send if the appointment is at least 3 days away, based on the patient's local time.
Use the patient's timezone to check if the appointment is more than 48 hours from now.

Check the appointment hasn’t been cancelled

Use this when you want to verify the appointment is still active before sending a reminder or confirmation. Start here — check the status field directly:
appointment_status.orValue("") != "Cancelled" &&
appointment_status.orValue("") != "Re-Scheduled"
Advanced — check against a live lookup result:
list_appts.exists(appt,
  appt.appointment_id == appointment_id &&
  appt.appointment_status == "Confirmed"
)
Use these sample prompts with Flo to generate a CEL expression that fits your goals.
Don't send a reminder if the appointment has been cancelled or rescheduled.
Only send if the appointment status is Confirmed.

Ready to build?

Open the Dashboard

Start building your appointment reminder workflow now.

Talk to the Morf team

Want a walkthrough or help getting started? Book a demo with us.

Further reading

For the complete CEL function reference — including all available operators, string functions, date helpers, and optional chaining syntax — see the CEL Reference.