Getting Wellness Data from your Apple Watch via Apple Shortcuts

Hi everyone,

I’m not sure if anyone else here uses an Apple Watch like I do, but I’ve been looking for a way to sync sleep wellness data from Apple Health—such as resting HR, HRV, and other metrics—with the Intervals.icu platform. This data can be super helpful for fine-tuning daily training sessions, and I’ve found a simple way to make this happen. I’m excited to share it with you!

First, big thanks to the Intervals.icu team for supporting an API that allows us to upload any kind of data to our accounts. You can find the API documentation here: Intervals.icu API Integration Cookbook
So as long as we can get the data from Apple Health then we can use Apple Shortcuts to upload the data automatically.

In the Shortcuts, you can create a Find Health Samples to get the data you want, and modify that data a little bit to the intervals.icu platform through API.


The following steps show how to put the data to the intervals.icu. This is most important part. Firstly, you need to have your athlete ID and API password (where you can find in the Settings- Developer Settings), and then go to the intervals.icu Wellness Endpoint to get your personal Curl data.
Firstly, go to AUTHENTICATION to set your personal API data

And then back to the Wellness section, input all the info and try. I’m using the restingHR and HRV data as an example here.

Once you have input all the correct data, the response should give you the right answer, where it shows the related data you’ve put, and you can also see your data changes in the interval.icu Activities.

And then the last step, go to the last one CURL, here we have all the info that we need in the apple Shortcuts.

In the Apple Shortcuts, you can input the data via Get Content of URL command like I post here


the request Body is the exact data you want to put to your interval.icu, and here are all the wellness data you can put:
{
“id”: “string”,
“ctl”: 0,
“atl”: 0,
“rampRate”: 0,
“ctlLoad”: 0,
“atlLoad”: 0,
“sportInfo”: [
{
“type”: “Ride”,
“eftp”: 0
}
],
“updated”: “1970-01-01T00:00:00.000Z”,
“weight”: 0,
“restingHR”: 0,
“hrv”: 0,
“hrvSDNN”: 0,
“menstrualPhase”: “PERIOD”,
“menstrualPhasePredicted”: “PERIOD”,
“kcalConsumed”: 0,
“sleepSecs”: 0,
“sleepScore”: 0,
“sleepQuality”: 0,
“avgSleepingHR”: 0,
“soreness”: 0,
“fatigue”: 0,
“stress”: 0,
“mood”: 0,
“motivation”: 0,
“injury”: 0,
“spO2”: 0,
“systolic”: 0,
“diastolic”: 0,
“hydration”: 0,
“hydrationVolume”: 0,
“readiness”: 0,
“baevskySI”: 0,
“bloodGlucose”: 0,
“lactate”: 0,
“bodyFat”: 0,
“abdomen”: 0,
“vo2max”: 0,
“comments”: “string”,
“steps”: 0,
“respiration”: 0,
“locked”: false
}

Finally, I’m posting my Shortcuts below for your reference, and please make sure to change the marked parts to yours info.

https://www.icloud.com/shortcuts/38adde90a2704f7b871cb9a44527db5d

Technically, once you set up all stuff and put the data you want successfully, and it is possible to upload data automatically without any touch and notification through Automation in Shortcuts. But just technically, because I need to open Apple Health App the first time every day after I set up, still working on that issues, but anyway I can have the data now :slight_smile:

I hope you can have the fitness and fun!

3 Likes

Or simply use HealthFit app to have all your Apple health data synced with Intervals.icu.

1 Like

yeah truth, this is easiest way :grinning:

Wow… that’s a cool shortcut! Tho convoluted but still cool!

Besides HealthFit, AFAIK, these are the apps to sync Apple Health → Intervals.icu

  • HealthFit
  • RunGap
  • BreakAway

Haha thanks, long time ago I’m using AutoSleep to track my sleep data, but it can not sync with intervals.icu, but with this shortcut it’s possible at least :rofl:

1 Like

I just tried HealthFit, and unfortunately found that for HRV, it sends an average value. I use the Apple meditation app for 1 minute first thing after waking to measure HRV, and the average value is not useful to me.

Do you know if there is a way to send an actual value instead of an average?

The wellness in intervals only allows or has 1 value per day. What would you like to get sent here?

In Healthfit, you can choose to sync VFC average, all measures (not compatible with Intervals.icu) or manually. In the description it says manually is to be used when you need the ones from Meditation app. I have never used it so give it a try.
You can find the setting in Healthfit → Profile → Health data → VFC reading.

Unfortunately, manual syncing is what I wanted to avoid. I can already do it manually in Intervals.

What I really want is the heart rate and HRV values that Apple Health stores right after I do a 1-minute Apple Watch meditation first thing in the morning. I already have a Shortcut that saves these into Notes. I’m just going to add the code to send it to Intervals and call the purchase of HealthFit a “lesson learned”.

Hi Andy, if you can Save the exact HRV data after 1-min meditation to Notes, it will be easy to use it to send to Intervals, but I don’t think there’s way automatically so far… maybe just one click of the Health APP and upload the HRV data will be the solution.

I’m already saving it. I’ve been saving it for quite a while, actually, then once a week or so I’ve been adding it to Wellness Data and re-analyzing any relevant workouts.

Currently I run a Shortcut on my watch right after I do the 1-minute meditation, which saves HRV and HR to Notes.I had not realized there was an API, though, so I’ll just add an HTTPS POST to Intervals to the shortcut.

Thanks for posting your shortcut.

1 Like

Here’s the shortcut I wrote:
https://www.icloud.com/shortcuts/68d796ffedb740f7a7949b2f21787a2c

I do a 1-minute meditation with Apple Meditation on my watch first thing after waking, and then immediately run the shortcut from my watch.

The shortcut picks up the latest values that Meditation wrote to Health, saves them in notes, and then sends them to Intervals.

2 Likes

good One! So. How does the meditation app work? They write a continuous array of values to the health app? And then heal for takes the average? And you only want th last value?

I had the impression that all HRV apps will output only 1 final number.

The watch normally takes an HRV reading on it’s own approximately every two hours and writes this to Health data. The Meditation app starts an HRV reading but also encourages you to breathe in a certain cadence (for meditation purposes). I don’t follow the pattern, but simply breathe normally.

Over the last 24 hour period, I had 16 HRV readings, including what I triggered myself through the Meditation app.

Here’s an example of the raw values written to Health for one HRV reading:

Name: 37.997 ms
Start Date: Feb 6, 2025 at 9:26 AM
End Date: Feb 6, 2025 at 9:27 AM
Duration: 59
Source: Andy’s Apple Watch
Type: Heart Rate Variability
Unit: ms
Value: 37.99699475559243

I don’t know how HealthFit calculates it’s averages. I’m not interested in averages in any case. I want my waking heart rate and waking HRV, so I run the shortcut immediately after doing the Meditation to pick up the latest values.

.

Makes sense now. My guess is apps take the averages for the day to get the final number because there are many values.

now that you’ve described what happens and what you need, then this makes much more sense. My take - the app is doing what the developer believes is the right thing to do. eg: you take weight measurements - let’s say 5 in succession and intervals only accepts 1 single number per day. So it’s the average that gets sent.

I think some companies (Garmin / coros ) has different takes on HRV measurements. They have Ongoing HRV (like your Apple Watch) and then a Morning/Waking HRV or perhaps an overnight HRV and they are either stored in a difference location/variable. With this, you at least can specify which HRV variable you’re interested to pull.

Honestly, dunno what HealthFit can do about this owing to how Apple stores the data / how interval stores the data.

I"m willing to bet some other software like fitness syncer / RunGap / BreakAway via @app4g all will behave like this.

Amazing job. Maybe I am doing something wrong, but in the API interface, after setting my ID (starting with “i”) and my API key (which I regenerated on intervals settign page), I am unable to get or push data. I receive the message “Access denied.” I pretty sure I’m copy pasting the good data. Am I doing something wrong?

{
  "status": 403,
  "error": "Access denied"
}

For the API, the user is the literal string ´API_KEY´.
pw is your api-key

1 Like

Upsss :grimacing:
Now it’s working, but I have another issue. It seems something is wrong when retrieving HRV data from Apple Health and converting it into a rounded number. The resulting HRV value is an excessively large number (20 digits, with the 2 first being correct), which causes an error when trying to push it to the Intervals API.
The restHR and this large HRV value are correctly written in the HRV apple note.

HealthFit cannot do what this can do at all. You can’t pass custom data with it and you can’t pass data from Autosleep.

3 Likes