inflatehq/docs/caldav-setup.md
chris 27589ab99f Initial commit: InflateHQ — Square to CalDAV approval app
Ingests Square invoices/payments, extracts event scheduling from order
notes, and pushes approved entries to a CalDAV calendar after human
review.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-21 15:19:05 -04:00

2.5 KiB

Finding your CalDAV URLs

The app needs two URLs:

  • CALDAV_SERVER_URL — the DAV root used for authentication.
  • CALDAV_CALENDAR_URL — the exact calendar collection events get written to. Must end with a trailing slash.

Create a dedicated calendar first (e.g. "Orders") so approved entries don't mix in with a personal calendar, then find its URL below.

Nextcloud

  1. Settings → your calendar app → click the three-dot menu next to the calendar → "Link" or "Copy private link".
  2. CALDAV_SERVER_URL: https://<your-nextcloud-domain>/remote.php/dav
  3. CALDAV_CALENDAR_URL: https://<your-nextcloud-domain>/remote.php/dav/calendars/<username>/<calendar-name>/
  4. Use an app password for CALDAV_PASSWORD, not your account password.

Fastmail

  1. Settings → Calendars → click the calendar → copy the "CalDAV URL".
  2. CALDAV_SERVER_URL: https://caldav.fastmail.com/dav/calendars
  3. CALDAV_CALENDAR_URL: the full URL copied above (ends in /).
  4. Generate an app password scoped to CalDAV.

iCloud

  1. CALDAV_SERVER_URL: https://caldav.icloud.com
  2. Generate an app-specific password for CALDAV_PASSWORD (2FA required).
  3. CALDAV_CALENDAR_URL requires discovering your principal path — the simplest way is to temporarily log the calendars from a Node REPL:
    const { DAVClient } = require("tsdav");
    const client = new DAVClient({
      serverUrl: "https://caldav.icloud.com",
      credentials: { username: "you@icloud.com", password: "app-specific-password" },
      authMethod: "Basic",
      defaultAccountType: "caldav",
    });
    await client.login();
    console.log(await client.fetchCalendars());
    
    Pick the url of the calendar you want from the printed list.

Self-hosted Radicale / Baïkal

  • CALDAV_SERVER_URL is your server's base URL (e.g. https://dav.example.com).
  • CALDAV_CALENDAR_URL is the collection URL for the specific calendar, typically https://dav.example.com/<username>/<calendar-id>/.
  • Credentials are whatever username/password (or app-specific token) your server issues.

Verifying

After setting the env vars, approve one candidate in the app and confirm the event shows up in your calendar client. If it fails, check the app logs (docker compose logs -f app) — CalDAV write failures are returned with the server's status code and response body.