Skip to content

Appointment reminders

When a booking is made, send a WhatsApp reminder 24 hours before the appointment and a feedback message two days after. If the booking is rescheduled, stop this run so a new one can take over.

For the same pattern inside a full use case, see Hospital appointments.

This recipe sends messages through an MCP tool on your own messaging service (for example a tool called send_whatsapp_template). See Tools and MCP for connecting one.

  1. API / webhook: input fields bookingRef, appointmentId, customerName, phone (phone), appointmentAt (text). Duplicate key bookingRef.
  2. Parallel with two branches.
    • Reminder branch:
      1. Wait: until add_hours(input.appointmentAt, -24), skip when days_between(now, input.appointmentAt) < 1, only continue within Mon-Sun 08:00-20:00.
      2. MCP tool: send_whatsapp_template with to = input.phone, template = "appointment_reminder", name = input.customerName, time = input.appointmentAt. Retries 3.
      3. Wait: until add_days(input.appointmentAt, 2).
      4. MCP tool: send_whatsapp_template with template = "visit_feedback".
      5. End: outcome completed.
    • Change branch:
      1. Wait for event: event appointment.rescheduled, correlation key appointmentId, time out after 90d.
      2. On received: End with outcome rescheduled.
      3. On timeout: End with outcome expired.
  3. On each MCP tool step’s On error port: an Error handler that escalates to a Front desk queue (a case your team sees in Workflows → Tasks) and then continues, so one failed message does not stop the follow-up.

The first End step reached finishes the run and stops the other branch.

{
"input": {
"bookingRef": "APT-1042-20261204T1000",
"appointmentId": "APT-1042",
"customerName": "Asha",
"phone": "+919800000000",
"appointmentAt": "2026-12-04T10:00:00+05:30"
},
"correlation": {"appointmentId": "APT-1042"}
}

Send it to POST https://api.nuacem.dev/workflow-api/public/v1/workflows/{workflowId}/runs with your secret key. See Starting runs.

When the appointment moves, send this to POST https://api.nuacem.dev/workflow-api/public/v1/events:

{
"eventName": "appointment.rescheduled",
"eventId": "evt-7781",
"correlation": {"appointmentId": "APT-1042"},
"data": {"appointmentId": "APT-1042"}
}

Then start a new run for the new time with a new bookingRef.

  • The API trigger checks the input and refuses a repeated bookingRef, so a retried request does not send two reminders.
  • The first Wait sleeps until a day before the appointment. For bookings made less than a day ahead it is skipped and the reminder goes out at once. Outside 08:00 to 20:00 it holds until the hours open.
  • The MCP tool steps send the messages through your service and retry if it is briefly unavailable.
  • The Wait for event catches a reschedule at any time, before or after the reminder.
  1. Open Test workflow, start from the API trigger and paste the input above, with an appointmentAt a few days ahead. Point the MCP tool at a test number or sandbox.
  2. Set Speed to Hours as seconds. The reminder step runs after about a minute.
  3. Start another test run. While it waits, send appointment.rescheduled from Waiting on you. The run ends with outcome rescheduled.
  • Built-in messaging (beta): use Send message instead of the MCP tool, with an approved WhatsApp template. Test it end to end in the test window first.
  • Ask for confirmation (beta): use a Collect form offering confirm or reschedule, and branch on the answer.
  • Doctor or branch closures: add a third branch that waits for doctor.cancelled with an Only events where filter on the date. See Hospital appointments.
  • Started by an agent: add a Started by an agent trigger so a booking agent can start reminders itself. Its runs are linked to the conversation, not to your appointment id, so cancel those runs instead of relying on events.