# Workflows

{/* AUTO-SYNCED SOURCE: this page lives in apps/app/src/modules/booking/docs/ and is mirrored into the docs app by `bun sync:module-docs`. Edit it in the module, not in apps/docs. */}

<Lead>
**Workflows** send the right messages at the right time without you having to think about it: reminders before the appointment, thanks afterwards, follow-ups on no-shows. Set up once, they work for every matching booking.
</Lead>

Creating and editing workflows requires the configure permission. Up to **20 workflows** are possible per workspace.

## Anatomy of a workflow

A workflow consists of a trigger, a time offset, a scope and actions:

<DefinitionList>
  <DefItem term="Trigger">**On booking**, **before the appointment starts**, **after the appointment ends**, **on cancellation** or **on reschedule**.</DefItem>
  <DefItem term="Time offset">For time-shifted triggers: 30 minutes, 1 hour, 4 hours, 24 hours, 2 days, 3 days or 1 week (before start or after end).</DefItem>
  <DefItem term="Applies to">All event types or a selection. That way the viewing gets different reminders than the phone appointment.</DefItem>
  <DefItem term="Actions">Up to **5 actions** per workflow. Each action has a channel (**email** or **WhatsApp**; WhatsApp to the guest only) and recipients: **guest**, **host** or **both**.</DefItem>
</DefinitionList>

While writing, a **live preview** with sample data helps, and **Test an mich senden** (send a test to me) delivers the message to you before real guests get it.

## Variables

In subject and body you insert variable chips that are filled with real data on sending:

| Variable | Content |
|---|---|
| `guest_name` | The guest's name |
| `guest_email` | The guest's email address |
| `guest_phone` | The guest's phone number (if collected) |
| `host_name` | The host's name |
| `event_name` | The event type's name |
| `starts_at` | Date and time of the appointment |
| `location` | Location or meeting point |
| `company_name` | Your company name |

Unknown variables block saving, so a broken message can never go out.

## The eight templates

Instead of starting from scratch, pick a template and adjust it:

1. **Reminder to the guest** (Erinnerung an den Gast)
2. **Reminder to the host** (Erinnerung an den Host)
3. **Thanks after the appointment** (Danke nach dem Termin)
4. **Cancellation info to the host** (Absage-Info an den Host)
5. **Follow-up after the appointment** (Nachfassen nach dem Termin)
6. **No-show reactivation** (No-Show-Reaktivierung)
7. **Appointment reconfirmation** (Termin-Rückbestätigung)
8. **Send documents in advance** (Unterlagen vorab senden)

## System workflows

Some messages are a fixed part of the tool and marked with a **System** badge in the list: the booking confirmation, the cancellation email and, where applicable, a 24-hour reminder migrated from earlier versions. System workflows are visible but fixed: they have no switch and cannot be turned off. This guarantees that every guest always receives a confirmation.

## The WhatsApp channel

An action can send via **WhatsApp** to the guest once your workspace's WhatsApp bot is connected. The rules:

- Delivery only inside the **active 24-hour conversation window** (the guest wrote to you on WhatsApp within the last 24 hours) and only when a **phone number** is on file. If a condition is not met, the run is marked as skipped in the log, with a plain-language reason such as guest without phone number.
- Messages are limited to **1000 characters**.
- Each delivered WhatsApp message costs **a few credits**, deducted silently in the background. If nothing is delivered, no credits are charged.
- If the balance is insufficient, the run ends as **failed** with the reason that the credit balance does not cover the WhatsApp sending. After topping up, **Erneut senden** (send again) retries.

## The delivery log

The log shows every run of the last **90 days** with the status **planned**, **sent**, **failed** or **skipped**. Skipped runs name their reason in plain language, for example:

- Appointment cancelled (a reminder for a cancelled appointment is discarded)
- Reschedule, no cancellation message (cancellation workflows deliberately skip reschedules)
- Send time missed (the planned send time was already in the past when created)
- Booking was fresh, the confirmation suffices (no reminder right after booking)

<Info title="Pausing">
A paused workflow plans nothing new, and for already planned runs the rule is: open runs are skipped. On reactivation, only future bookings start runs again.
</Info>

## Further reading

Back to the overview: [Appointment Booking](/tools/booking). Next page: [Routing forms](/tools/booking/routing-formulare). For skipped or failed WhatsApp runs: [Troubleshooting](/tools/booking/troubleshooting).
