Several years ago, I had a Garmin Fenix 5 Plus watch for a while. I’ve turned that into a D2 Delta watch to unlock all possible features. During that time, I also switched from my beloved BlackBerry KEY2 Android phone to an iPhone. And as a former fan of Google Health, I liked the way of how iOS unites all personal medical data in Apple Health.
Garmin’s Connect app already supports pushing the data collected by the watch into Apple Health. However, this doesn’t include the SpO₂ aka. pulse ox aka. blood oxygen measurements. I’ve found feature requests from as early as mid 2018 that asked for syncing these values into Apple Health. One with a bit more feedback – even from Garmin employees – was from early 2021. But even in 2024, Garmin doesn’t seem to be interested in implementing this.
So I came up with an alternative way.
As all data goes into your Garmin Connect account, I had to find a way to pull it out of there. It turned out I wasn’t the first one with that idea. cyberjunky aka. Ron from The Netherlands already built a nice Python library to communicate with the Garmin Connect website. I’ve used this to regularly pull all my PulseOx data from Garmin Connect into a local SQLite database.
From there, I needed to find a way to get it into Apple Health. Turns out, Apple’s own Shortcuts app does support writing any kind of record into Apple Health. Now I just needed to bridge the gap between my SQLite database and Apple Shortcuts.
For that, I’ve created a small PHP script that serves the records from the last 24 hours in JSON format.
Then, I’ve created a Shortcut that pulls that information via a web request and also the records from the past 24 hours from Apple Health, compares both, and adds the missing records into Apple Health. And it worked beautifully until I got rid of the Garmin in favour of an Apple Watch.
The Python and PHP code is here. The Shortcut can be installed from here. Have fun.