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