# Launch27 Cancellation Zap Setup

## What this does
Receives Launch27 cancellation events from Zapier and posts them into Slack `#cancellations`.

## Receiver script
- `scripts/launch27-cancellation-zap-receiver.py`
- Default port: `8782`
- Endpoint path: `/launch27-cancellation-webhook`
- Health check: `/health`

## Slack target
- `#cancellations` (`CLXFQ8NBW`)

## Expected payload
The receiver is tolerant about field names. Best version to send from Zapier is:

```json
{
  "event": "booking_cancelled",
  "booking_id": "77557",
  "customer_name": "Hiu Laam Au",
  "service_address": "31 Bales Avenue #608",
  "scheduled_at": "2026-04-11 08:00 AM",
  "cancellation_reason": "not needed this month",
  "cancellation_scope": "this booking only",
  "cancelled_by": "admin"
}
```

## Zapier webhook target
Point the Zap webhook action to:

```text
https://macbookair.taila88920.ts.net:8782/launch27-cancellation-webhook
```

If the tunnel or reverse proxy only exposes selected ports, use whatever mapped public URL points to port 8782.

## Running it
Example local start:

```bash
python3 /Users/harvey/.openclaw/workspace/scripts/launch27-cancellation-zap-receiver.py
```

Background example:

```bash
nohup python3 /Users/harvey/.openclaw/workspace/scripts/launch27-cancellation-zap-receiver.py >/tmp/openclaw/launch27-cancellation-webhook.out 2>&1 &
```

## Output / logs
- Event log: `memory/launch27-cancellation-events.jsonl`
- Runtime log: `/tmp/openclaw/launch27-cancellation-webhook.log`

## Notes
- This is intentionally narrow: cancellation alerts only.
- It posts to `#cancellations`, not the generic Launch27 alerts sink.
- It does not modify Launch27, Airtable, or GHL. Alerting only.
- If you later want filtering, we can add severity rules like:
  - same-day cancellation
  - recurring cancellation
  - cancellation with missing reason
  - cancellation fee dispute keywords
