health.md icon health.md
Integrations · Automate

Shortcuts & App Intents

Eight App Intents let you trigger exports, fetch summaries, and toggle the schedule from Siri, the Shortcuts app, Focus filters, automations, and any other AppIntent-aware host.

Available intents

Export Yesterday's Health Data

Zero-parameter shortcut. The fast path for "just export yesterday's data and shut up about it." Same engine as the manual export.

Export Health Data for a Date

Single Date parameter. Time-of-day is ignored. Useful in calendar-driven automations.

Export Health Data for Date Range

Start Date and End Date parameters, inclusive on both ends. Use for backfills.

Export Last N Days of Health Data

Number of Days parameter (1–366). Ends yesterday. Default 7. Good for "every Sunday, export last 7 days" automations.

Get Health Summary for a Date

Returns a structured snapshot — steps, active calories, sleep, heart rate — without writing anything to the vault. Use this in Shortcuts to feed values into other apps.

Get Last Export Status

Returns the timestamp, success state, day count, and any failure reason from the most recent export run. Pair with notifications to alert when a scheduled run fails.

Turn Scheduled Export On or Off

Boolean parameter. Use to suspend the schedule (e.g. on vacation Focus) and resume it later.

Export Health Data

Generic export — uses the date range from the in-app Export modal's last state. Less common; the date-range variants are usually clearer.

Where to find them

Open the Shortcuts app on iOS or macOS. Tap the + button to create a new shortcut, search for "Health.md" or any of the intent titles above. They live under the Health category.

Most intents have openAppWhenRun = false, so they execute headlessly — no app launch, no UI flash. They work from automations, Focus filters, the Hey Siri handoff, and the Action Button.

Recipe: nightly export with confirmation

  1. Personal AutomationTime of Day → 11:30 PM, every day.
  2. Export Yesterday's Health Data intent.
  3. Get Last Export Status intent.
  4. Show Notification with the result.

Recipe: backfill on a one-off

  1. Create a shortcut.
  2. Export Health Data for Date Range with start = 2024-01-01, end = 2024-12-31.
  3. Run from Shortcuts. Walks the year, writes one file per day. May take a few minutes for full years.

Recipe: pause schedule on vacation

  1. Focus filter: when Vacation Focus turns on, run Turn Scheduled Export On or Off with Enabled = false.
  2. When Focus turns off, run again with Enabled = true.
Authorization required.

Intents inherit your in-app HealthKit permission and vault selection. They will fail with a clear error if the app hasn't been opened-and-set-up at least once on this device.

Related