Skip to content

Collection of Apple Shortcuts to export Oura Ring Health data to Apple Health.

Notifications You must be signed in to change notification settings

James-2879/OuraAppleHealth

Repository files navigation

OuraAppleHealth

Apple Shortcuts for exporting Oura data to Apple Health using the V2 API.

Table of contents

  1. Introduction
    1. Set-up
  2. Notes
    1. Continuous Heart Rate Variability
    2. Lowest Resting Heart Rate
    3. Body Temperature
    4. Blood Oxygen Saturation
  3. Contributing

Introduction

These shortcuts aim to export five data types from Oura to Health (click the links below to download each shortcut).

Important

These shortcuts are not a way to get around the Oura Subscription, they need to be able to access the Oura API, which is only possible with a subscription. Note that for Generation 2 users this should not be a requirement, only for Generation 3 users.

Set-up

This is quick and simple.

  1. Download the desired shortcuts as linked in the introduction
  2. Generate an Oura Personal Access Token (API key) here
  3. Add your key to the top of each shortcut (open up the shortcut in the app and there is a 'Text' block where the key should be pasted)
  4. Set up an Automation in the Shortcuts App to run these shortcuts automatically every day

Done!

Tip

These shortcuts can only run once you have opened the app in the morning to sync your sleep data. Therefore it is recommended to set the automation to run at a time when you know you will have opened the Oura app, or the scripts will fail to run. It is suggested to set the time for sometime in the afternoon, unless you tend to sync your data as soon as you get up. The data is written as if it was added at 6 am every morning, because this is generally the midpoint of my sleep, you may want to change this to be earlier or later. At some point I may alter it so that the shortcut calculates the midpoint of the sleep period and then writes it to that time.

Note

These shortcuts are designed for iPhone, and will not run on MacOS as there is no native Apple Health API available.

Notes

Heart Rate Variability

Two shortcuts are available.

  • Continuous pulls all values recorded by Oura for a sleep period (usually logged every five minutes). Thanks to @exhibiton for this shortcut.
  • Average pulls only the average HRV for the night.

Caution

Note that only one of Continuous or Average HRV shortcuts should be used.

Lowest Resting Heart Rate

This pulls the single lowest heart rate captured over the night, and logs it as Resting Heart Rate in Apple Health. This is different to the Heart Rate metric, which Oura automatically syncs to Health.

Body Temperature

There is no Skin Temperature metric in Apple Health, which is what Oura measures. Instead, this shortcuts adds 37 celsius to the temperature change recorded in Oura, and logs it to the Body temperature metric. This evidently isn't that scientific, but this allows you to identify trends easily in the Health app, particularly as negative temperature values are not allowed for obvious reasons. The value can be changed from 37 to an alternative number in the shortcut if that is more preferable.

Note

Oura should store temperature data in celsius, not fahrenheit, so 37C should automatically translate to 98.6F if you use non-metric units in Health/Oura. Please let me know if this is not the case.

Blood Oxygen Saturation

Oura have finally added this to the V2 API; the API docs in general are also getting much better. Note that Health may show decimals for the percentage. This is expected as Oura automatically rounds data in the app, but exists as the true decimal value within the data on Oura Cloud (which the API pulls from).

Caution

If you previosuly generated a key (personal access token) for use with the V1 API (or earlier versions of the V2 API), you will need to generate a new token for the shortcuts to be able to access blood oxygen data.

Contributing

If you would like to contribute to the shortcuts, please fork this repo and create a Pull request which will be reviewed.

Alternatively, if you have an issue or suggestion, please create an Issue for this repo.