I’ve been tracking health metrics with my Apple Watch for years: blood pressure readings, workout sessions, sleep quality, heart rate variability, VO2 max, daily steps. The data is incredibly detailed — every run mapped, every night’s sleep scored, every day’s resting heart rate logged.

The problem? Apple keeps this data locked in a walled garden. There’s no native way to export it or build custom reports. The Health app does suggest trends, but only on a 6-month time horizon — too slow to spot week-to-week changes or adjust training in real time.

I wanted a weekly summary — something I could read every Sunday that showed me the real trends: Is my resting heart rate improving? Am I sleeping better this week than last? How much did I actually run this month?

The Export Problem

Apple Health data lives on your iPhone. You can view it in the Health app, but exporting it programmatically requires jumping through hoops. There’s no official API. The only native export option is a massive XML archive that’s painful to parse and only accessible via manual export.

For years, this meant either:

  1. Manually exporting and parsing XML every week (tedious)
  2. Paying for a third-party service that stores your health data on their servers (privacy nightmare)
  3. Giving up on analytics entirely (frustrating)

The Solution: HealthAutoExport + OpenClaw

OpenClaw helped me find a middle ground: HealthAutoExport — an iOS app that automatically exports Apple Health data to JSON format. It’s not perfect (there’s still a manual step), but it’s good enough.

Here’s the workflow:

  1. HealthAutoExport runs on my iPhone — it has permission to read Apple Health data
  2. Every week, I manually trigger an export — taps a button, generates a zip file
  3. I upload the zip to a Google Drive folder (“Apple Health”)
  4. OpenClaw automatically detects the new file and processes it
  5. A Python script downloads, parses, and analyzes the data
  6. A formatted summary appears in my Telegram every Sunday evening

The only manual step is uploading the zip to Drive. It takes 30 seconds. For that small effort, I get automated weekly analytics without trusting a third party with my health data.

Building the Solution with OpenClaw

This wasn’t a case of “here’s a script, run it.” The entire solution — from finding the export tool to building the analytics pipeline — emerged through conversation with OpenClaw.

My starting point:

  • I want weekly health analytics delivered automatically
  • Apple doesn’t provide a good export option
  • I care about week-over-week trends, not absolute numbers
  • Focus metrics: sleep, heart rate, HRV, VO2 max, steps, workouts

OpenClaw’s research and questions:

  • Found HealthAutoExport as the best iOS export option (JSON format, privacy-preserving)
  • Which Google Drive folder should we use? (I created “Apple Health”)
  • What should happen if no new file is uploaded? (Stay silent)
  • What time zone for “last 7 days”? (UTC is fine; data is timestamped)
  • How should workouts be summarized? (Total count, time, distance, breakdown by type)

The iterative process:

  • First version: basic metric extraction, no comparisons
  • Second iteration: added week-over-week deltas
  • Third iteration: refined the output format for Telegram readability
  • Fourth iteration: added state tracking to prevent duplicate reports
  • Fifth iteration: improved error handling (what if the zip is corrupted? what if Drive is slow?)

OpenClaw implemented the parsing logic, the Drive integration, the cron job setup, and the error handling. I provided the requirements and validated the output. The result is a script that does exactly what I need, no more, no less.

The beauty of this approach: I didn’t need to know how to parse HealthAutoExport JSON, handle zip files in Python, or integrate with the Google Drive API. I just explained what I wanted. OpenClaw turned that into working code.

What the Report Shows

The weekly summary compares the last 7 days against the previous 7 days:

Sleep:

  • Average hours per night

Recovery:

  • Resting heart rate (with week-over-week change)
  • Heart rate variability (HRV)
  • VO2 max (if available)

Activity:

  • Average daily steps
  • Average active energy (calories burned)

Training:

  • Total workouts
  • Total workout time and distance
  • Breakdown by workout type (e.g., “Running×3, Cycling×2”)

Example output:

Apple Health weekly summary (2026-02-03 → 2026-02-09)

Sleep
- Avg sleep: 7.2 h/night

Recovery
- Resting HR: 58 bpm (-2 bpm vs prev)
- HRV: 42 ms (+3 ms vs prev)
- VO2 max: 48.5 ml/kg/min (+0.5 vs prev)

Activity
- Steps (avg/day): 8,420 (+650 vs prev)
- Active energy (avg/day): 520 kcal (+45 kcal vs prev)

Training
- Workouts: 3 (total 145 min)
- Total distance: 18.5 km
- Breakdown: Running×3

The week-over-week deltas are the killer feature. Instead of staring at raw numbers, I instantly see: Am I improving? Regressing? Staying consistent?

How It Works (Technical Details)

The automation is a cron job that runs every Sunday at 21:15 London time.

The Python script:

  1. Lists files in the Google Drive folder using gog drive ls
  2. Finds the newest .zip file
  3. Checks a state file (apple-health-state.json) to see if it’s already processed
  4. Downloads the zip using gog drive download
  5. Extracts the JSON file from the zip
  6. Parses the JSON to extract metrics and workouts
  7. Computes weekly averages for the last 7 days and the previous 7 days
  8. Formats the report and sends it to Telegram

State tracking prevents duplicate reports. If I don’t upload a new file, the script exits silently. If I upload multiple files in one week, only the newest is processed.

Metric selection is hardcoded in the script — I focus on sleep, heart rate, HRV, steps, active energy, and VO2 max. Adding new metrics is as simple as updating the METRICS_WANTED set.

The script lives at /home/ubuntu/clawd/scripts/apple_health_weekly_report.py. Zero external dependencies — just Python stdlib, the gog CLI, and zipfile.

Why This Approach Works

Privacy: My health data stays in three places: my iPhone, Google Drive (which I already trust for everything else), and my server. No third-party analytics companies.

Consistency: Every Sunday, I get the same report format. I can compare this week to last week, spot trends, and adjust training.

Low maintenance: The manual step (upload to Drive) takes 30 seconds. Everything else is automated. The script hasn’t needed maintenance since I built it.

Extensibility: Want to track a new metric? Update the script. Want to change the report format? Edit the output section. Full control, no vendor lock-in.

The One Remaining Pain Point

The weekly upload step is manual because iOS doesn’t allow apps to automatically sync to cloud storage in the background (thanks, Apple). HealthAutoExport can auto-export to Files.app, but I still need to manually upload from Files to Drive.

I’ve tried a few workarounds (Shortcuts automation, third-party sync apps), but they’re all either unreliable or require leaving another app running constantly. The 30-second manual step is the lesser evil.

If Apple ever opens up Health data export via an API, or if HealthAutoExport gains direct Google Drive sync, this last step disappears. Until then, it’s a small price to pay.

Results

Before: vague sense of “I think I’m sleeping better?” based on memory.

After: concrete numbers every week. I can see when training volume is creeping up too fast (resting HR stays elevated). I can see when I’m not recovering (HRV drops). I can spot sleep debt accumulating.

The data doesn’t make decisions for me. But it makes the decisions I do make much better informed.

And it all happens automatically, with a 30-second manual step per week.

Sometimes “good enough automation” beats “perfect manual process.” This is one of those times.