PartialHow to

Apple Health

Your iPhone's Health data can flow into Mandala as daily measurements in your personal records: one value per metric per day, and one record per workout. Your accomplice reads them with its personal-records tools ("how did I sleep this week?").

Data arrives two ways: pushed regularly by the Health Auto Export app (App Store), or uploaded as Apple's own export.zip. See it in Personal → Health.

Coming soon — the Mandala iPhone app reads Health directly in the background, with no third-party app. Turning it on replaces Health Auto Export.

Set it up

  1. Settings → Extensions → Apple Health → Create token. Copy the token now: it is shown once. The page also shows the Endpoint.
  2. Turn on Accept pushes.
  3. In Health Auto Export on your iPhone: Automations → New automation → REST API.
  4. URL: the endpoint. Headers: Authorization = Bearer <token>.
  5. Data type: Health Metrics (all, or the ones you want). Add a second automation for Workouts if you want them.
  6. Export format JSON, export version Version 2, Aggregate data on, interval Days, date range Last 7 days.
  7. Sync cadence: every hour, or as often as you like. Your iPhone must be on your tailnet (Tailscale on) to reach the address.
  8. Tap Manual export once. The result appears under Last import in Settings.

Choose what to keep

Under What to keep, turn categories on or off and Save categories. Metrics in a category that is off are dropped on arrival.

Apple's own export

On the iPhone: Health → your picture → Export All Health Data. Upload export.zip under Apple's own export, choosing How far back. It is read on the server without loading it whole, and re-importing changes nothing.

Backfill with Health Auto Export

Import a file: upload a Health Auto Export JSON export (Version 2). Imports are idempotent: a day already recorded with the same value is left alone, and today's value is replaced as it fills.

Your accomplice and your health

Under Alma in the same page:

  • Daily digest at a time you choose: yesterday's numbers, what stands out from your usual, and your goals.
  • Tell Alma after n hours without a push from the phone, so a broken automation is noticed.

Personal → Health shows what stands out against your usual, your goals (Add goal), your measurements and two weeks of workouts. See Personal.

Disconnect

Disconnect revokes the token; pushes are refused from then on. New token replaces it.