Apple Health → Wilmy miles

A free iPhone Shortcut that sends your runs from Apple Health (Apple Watch or iPhone) to your Wilmy Run Crew miles. No Strava needed.

Before you start

  1. An iPhone with the Shortcuts app (built in) and runs saved in the Health app. Runs from Apple's Workout app on Apple Watch land there automatically.
  2. Your personal Shortcut key: open Crew → Miles, find the Apple Health (iPhone) card and tap Create my Shortcut key, then Copy. It's shown once; treat it like a password. You can revoke it there anytime.

Build “Send my runs to Wilmy Fit” (about 5 minutes)

Action names are exactly as they appear in the Shortcuts app (iOS 17/18). Search for each action with the search bar at the bottom of the editor.

  1. New shortcut. Open Shortcuts → tap +. Tap the name at the top and rename it Send my runs to Wilmy Fit.
  2. Find Health Samples. Add the action Find Health Samples. Tap the type and choose Walking + Running Distance. Tap Add Filter and set Start Date · is in the last · 1 · days (use 14 days the first time to catch up). Tap Add Filter again and set Source · is · your Apple Watch (so phone-in-pocket walking isn't counted twice). Set Sort by Start Date, Oldest First, and Unit mi.
    Apple Health can't hand Shortcuts your workouts directly, so we send distance samples and Wilmy groups them into runs, keeping only running pace (walks are skipped).
  3. Repeat with Each. Add Repeat with Each; it should say Repeat with each item in Health Samples.
  4. Inside the repeat, read each sample. Add these, in order, between Repeat and End Repeat:
    • Get Details of Health Sample → choose Start Date (of Repeat Item).
    • Format Date → Date Format ISO 8601, turn on Include ISO 8601 Time. Long-press its output, Rename it Start.
    • Get Details of Health Sample → End Date of Repeat Item, then another Format Date (ISO 8601, include time). Rename it End.
    • Get Details of Health Sample → Value of Repeat Item.
    • Get Details of Health Sample → Source of Repeat Item. Rename it Source. (Lets us confirm the run came from your watch; runs typed into the Health app by hand are never counted.)
    • Text → type exactly: {"start":"Start","end":"End","value":Value,"unit":"mi","source":"Source"} inserting the four variables where shown (tap the variable bar above the keyboard).
    • Add to Variable → Variable Name Runs.
  5. After End Repeat, build the message. Add Combine Text → combine Runs with Custom separator ,. Then add Text → type {"samples":[ insert Combined Text and type ]}.
  6. Send it. Add Get Contents of URL. URL: https://wilmyfit.com/api/crew/health-import. Tap Show More: Method POST; under Headers tap Add new header: key Authorization, value Bearer followed by your key (one space after Bearer). Add a second header Content-Type = application/json. Request Body: File, then pick the last Text. Optional: add Show Notification with Contents of URL to see “Wilmy Fit: 1 run added (3.1 mi)”.
  7. Make it automatic (Personal Automation). In Shortcuts, tap Automation → + (or New Automation). Choose Apple Watch Workout → Workout Type Running → When Workout End, then choose Run Immediately and tap Next → pick Send my runs to Wilmy Fit. No Apple Watch? Use Time of Day (e.g. 9:00 PM, Repeat Daily) → Run Immediately instead.
  8. Test it. Tap the shortcut once. The first time, iPhone asks to allow access to Health data (allow Walking + Running Distance) and to connect to wilmyfit.com (tap Allow). Your runs show up in Crew → Miles marked Apple Health.

Good to know

  • Only the last 14 days are accepted, and each run is counted once (same start time = same run). If Strava sends the same run too, it's held as a duplicate instead of counting twice.
  • Apple Health runs count 100%, with the same checks as Strava: runs faster than about 4:00/mi, slower than walking, or unusually big days are held for a quick review; at most 4 runs per day.
  • Your key only lets the Shortcut add runs to your account; it can't read anything. Lost your phone? Revoke the key in Crew → Miles.
  • Apple references: Request your first API in Shortcuts · Create a personal automation.