Appointment Booking

🇬🇧 English | 🇩🇪 Deutsch


🇬🇧 English

Appointment Booking via Nextcloud Calendar

This use case shows how users can book appointments directly in the chat without external calendar links. The agent creates the appointment directly in a Nextcloud calendar.

Target Groups

  • Medical practices
  • Consulting companies
  • Solopreneuers
  • Anyone offering online appointments

Prerequisites

1. Nextcloud

  • Nextcloud instance on its own subdomain (e.g., cal.example.com)
  • Calendar app enabled
  • Dedicated user for the agent (e.g., “clawdia”)

2. App Password

In Nextcloud, go to Settings → Security → Devices & sessions:

  • Generate a new app password
  • IMPORTANT: Can be scoped to specific apps (e.g., only Calendar)

3. OpenClaw

  • Skill: openclaw-nextcloud (via ClawHub)
  • Install:
    openclaw skills install openclaw-nextcloud

4. Credentials

On the server in ~/.env:

NEXTCLOUD_URL=https://cal.example.com
NEXTCLOUD_USER=agent-username
NEXTCLOUD_TOKEN=app-password

Setup

Step 1: Install Skill

openclaw skills install openclaw-nextcloud

Step 2: Add Credentials

nano ~/.env

Add:

# Nextcloud Calendar
NEXTCLOUD_URL=https://cal.example.com
NEXTCLOUD_USER=clawdia
NEXTCLOUD_TOKEN=your-app-password

Step 3: Restart Gateway

openclaw gateway restart

Step 4: Configure Agent (AGENTS.md)

Add rules for appointment booking:

## Terminbuchung (Nextcloud Calendar)

- No technical details (no paths, no UIDs)
- Don't ask about default calendar every time

**Credentials:**
- NEXTCLOUD_URL, NEXTCLOUD_USER, NEXTCLOUD_TOKEN in ~/.env
- NEVER reveal to user

**Standard-Kalender:**
- DigitalCompass as default calendar

### Workflow: Three-Step

For appointment requests, always follow:

1. **Check** → Read calendar, find free times
2. **Suggest** → Propose a time ("How about Tuesday 14:00?")
3. **Confirm** → Only create appointment after confirmation

When user specifies exact time: Check if free first, then respond.

**Tool-Aufruf:** Only ask for free times, don't fetch all appointments.

**Current year:** 2026

**Answer:** Never say "Calendar is empty". Better: "The next free times are..."

Workflow

Basic Flow

  1. User writes: “I would like a consulting appointment”
  2. Agent: “One moment please.” (with calendar tool call)
  3. Agent checks free times
  4. Agent suggests times:
The next free times are:

Tuesday, June 9, 2026 → 10:00-11:00 AM or 2:00-3:00 PM
Wednesday, June 10, 2026 → 9:00-10:00 AM

Which works for you?
  1. User confirms: “Wednesday 9 AM please”
  2. Agent creates appointment
  3. Agent confirms:
Appointment created! ✅

📅 Wednesday, June 10, 2026
⏰ 09:00 - 10:00 AM
📝 Consulting Appointment

Delete Appointment

  1. User writes: “Cancel my appointment on Wednesday”
  2. Agent: “One moment please.”
  3. Agent deletes appointment
  4. Agent confirms:
Appointment deleted! ✅

📅 Wednesday, June 10, 2026
09:00 - 10:00 AM

Available Commands (Internal)

# List calendars
node scripts/nextcloud.js calendars list --type events

# Get appointments
node scripts/nextcloud.js calendar list --calendar "DigitalCompass" --from 2026-06-01 --to 2026-06-07

# Create appointment
node scripts/nextcloud.js calendar create \
  --summary "Consulting Appointment" \
  --start 2026-06-04T13:00:00 \
  --end 2026-06-04T14:00:00 \
  --calendar "DigitalCompass"

# Delete appointment
node scripts/nextcloud.js calendar delete --uid <appointment-uid>

Important Notes

Subdomain

Always run Nextcloud on its own subdomain:

  • cal.example.com (NOT example.com/nextcloud)
  • Easier SSL configuration
  • Clear separation

Credential-Scope

  • App password can be restricted to specific apps
  • Calendar-only token is sufficient for booking
  • Token can be revoked anytime in Nextcloud

Security

  • NEVER reveal credentials to users
  • No internal paths/URLs in responses
  • Token goes in ~/.env (NOT in OpenClaw config)

Privacy

  • Users should NOT see other customers’ appointments
  • Only show free times, never list existing appointments
  • The agent says “The next free times are…” instead of showing what’s already booked

Known Limitations

  • No repeating appointments (recurring events)
  • Time format must be ISO 8601
  • LLM may mix text output with tool results (needs further investigation)

Alternatives

  • Calendly/Booking link (external)
  • Google Calendar (via google-calendar skill)
  • Microsoft 365 (via clippy skill)

🇩🇪 Deutsch

Terminbuchung über Nextcloud-Kalender

Dieser Use Case zeigt, wie Nutzer direkt im Chat Termine buchen können, ohne externe Kalender-Links. Der Agent erstellt den Termin direkt im Nextcloud-Kalender.

Zielgruppen

  • Arztpraxen
  • Beratungsunternehmen
  • Solopreneure
  • Alle, die Online-Termine anbieten

Voraussetzungen

1. Nextcloud

  • Nextcloud-Instanz auf eigener Subdomain (z.B. cal.beispiel.de)
  • Kalender-App aktiviert
  • Dedizierter Benutzer für den Agenten (z.B. „clawdia”)

2. App-Passwort

In Nextcloud unter Einstellungen → Sicherheit → Geräte & Sitzungen:

  • Neues App-Passwort generieren
  • WICHTIG: Kann auf spezifische Apps beschränkt werden (z.B. nur Kalender)

3. OpenClaw

  • Skill: openclaw-nextcloud (via ClawHub)
  • Installieren:
    openclaw skills install openclaw-nextcloud

4. Credentials

Auf dem Server in ~/.env:

NEXTCLOUD_URL=https://cal.beispiel.de
NEXTCLOUD_USER=agent-benutzername
NEXTCLOUD_TOKEN=app-passwort

Einrichtung

Schritt 1: Skill installieren

openclaw skills install openclaw-nextcloud

Schritt 2: Credentials eintragen

nano ~/.env

eintragen:

# Nextcloud Kalender
NEXTCLOUD_URL=https://cal.beispiel.de
NEXTCLOUD_USER=clawdia
NEXTCLOUD_TOKEN=dein-app-passwort

Schritt 3: Gateway neustarten

openclaw gateway restart

Schritt 4: Agent konfigurieren (AGENTS.md)

Regeln für Terminbuchung hinzufügen:

## Terminbuchung (Nextcloud Calendar)


- Keine technischen Details (keine Pfade, keine UIDs)
- Nicht jedes Mal nach Standard-Kalender fragen

**Credentials:**
- NEXTCLOUD_URL, NEXTCLOUD_USER, NEXTCLOUD_TOKEN in ~/.env
- NIEMALS dem Nutzer verraten

**Standard-Kalender:**
- DigitalCompass als Standard-Kalender

### Workflow: Dreischritt

Bei Terminanfragen immer diesem Schema folgen:

1. **Prüfen** → Kalender lesen, freie Zeiten finden
2. **Vorschlagen** → Zeit vorschlagen („Wie wäre Dienstag 14:00?")
3. **Bestätigen** → Erst nach Bestätigung Termin anlegen

Wenn Nutzer konkrete Zeit nennt: Erst prüfen ob frei, dann antworten.

**Tool-Aufruf:** Nur nach freien Zeiten fragen, nicht alle Termine abrufen.


**Aktuelles Jahr:** 2026

**Antwort:** Nie „Kalender ist leer“ sagen. Besser: „Die nächsten freien Zeiten sind..."

Workflow

Grundablauf

  1. Nutzer schreibt: „Ich möchte einen Beratungstermin”
  2. Agent: „Einen Moment bitte.“ (mit Kalender-Tool-Aufruf)
  3. Agent prüft freie Zeiten
  4. Agent schlägt Zeiten vor:
Die nächsten freien Zeiten sind:

Dienstag, 9. Juni 2026 → 10:00-11:00 Uhr oder 14:00-15:00 Uhr
Mittwoch, 10. Juni 2026 → 09:00-10:00 Uhr

Welcher Termin passt dir?
  1. Nutzer bestätigt: „Mittwoch 9 Uhr bitte”
  2. Agent erstellt Termin
  3. Agent bestätigt:
Termin erstellt! ✅

📅 Mittwoch, 10. Juni 2026
⏰ 09:00 - 10:00 Uhr
📝 Beratungstermin

Termin löschen

  1. Nutzer schreibt: „Streich meinen Termin am Mittwoch”
  2. Agent: „Einen Moment bitte.“
  3. Agent löscht Termin
  4. Agent bestätigt:
Termin gelöscht! ✅

📅 Mittwoch, 10. Juni 2026
09:00 - 10:00 Uhr

Verfügbare Befehle (Intern)

# Kalender auflisten
node scripts/nextcloud.js calendars list --type events

# Termine abrufen
node scripts/nextcloud.js calendar list --calendar "DigitalCompass" --from 2026-06-01 --to 2026-06-07

# Termin erstellen
node scripts/nextcloud.js calendar create \
  --summary "Beratungstermin" \
  --start 2026-06-04T13:00:00 \
  --end 2026-06-04T14:00:00 \
  --calendar "DigitalCompass"

# Termin löschen
node scripts/nextcloud.js calendar delete --uid <termin-uid>

Wichtige Hinweise

Subdomain

Nextcloud IMMER auf eigener Subdomain betreiben:

  • cal.beispiel.de (NICHT beispiel.de/nextcloud)
  • Einfachere SSL-Konfiguration
  • Klare Trennung

Credential-Scope

  • App-Passwort kann auf einzelne Apps beschränkt werden
  • Kalender-nur-Token reicht für Terminbuchung
  • Token kann jederzeit in Nextcloud widerrufen werden

Sicherheit

  • NIEMALS Credentials dem Nutzer verraten
  • Keine internen Pfade/URLs in Antworten
  • Token in ~/.env (NICHT in OpenClaw-Config)

Datenschutz

  • Nutzer dürfen NICHT die Termine anderer Kunden sehen
  • Nur freie Zeiten zeigen, niemals existente Termine auflisten
  • Der Agent sagt „Die nächsten freien Zeiten sind…“ statt was bereits Gebuchtes anzuzeigen

Bekannte Einschränkungen

  • Keine wiederholenden Termine (recurring events)
  • Zeitformat muss ISO 8601 sein
  • LLM kann Textausgabe mit Tool-Ergebnissen vermischen (braucht weitere Recherche)

Alternativen

  • Google Calendar (via google-calendar Skill)
  • Microsoft 365 (via clippy Skill)