Red Green Repeat Adventures of a Spec Driven Junkie

Shortcuts - Really Connect to Health

This is part of a series:

Introduction

Yesterday, the Connect to Health article showed adding a Log Health Sample Shortcut, which prompts a user for a value and records in the Health app.

This article will go over getting the Log Health Sample Shortcut on your Apple Watch.

Apple Watch Test

Take the Get Input Shortcut with the Log Health Sample:

Shortcut - Log Health

and transfer it to Apple Watch:

Shortcuts - Shortcut Details

Now, test it out on Apple Watch by going to the Shortcuts app:

Shortcuts - Apple Watch App List

and running the Shortcut

Shortcuts - Shortcuts List

In my case, there was only one prompt for data, the one I created and when checking for a new Health entry, I only saw yesterday’s:

Shortcut - Validate Health Data

How to Get Health Input on Apple Watch

This is where the “Get Numeric Input” Shortcut comes into play, from the Get Input Shortcut:

Shortcuts - Shortcut Details

Long press the Log Health Sample section until it pops up and drag between Get Numbers From and Display Alert shortcuts.

Shortcuts - Arrange Health

Configure Log Health Sample with the following:

  • a Type - I selected “Weight” in the following screen.
  • a Value - I selected “Numbers” in the following screen, which will ask for input.
  • a Date - I selected “Current Date” in the following screen, which is the date you run the Shortcut.

Shortcuts - Configured Health

This is basically the same as before, the key difference is the setting for Value. Now, it will use the Numbers input from the Get Numbers From as it’s value instead of prompting a value itself.

Notice there is a thin line between the Get Numbers From section and the Log Health Sample section.

Testing

Now, get this onto Apple Watch and test again - I’m making a new weight entry.

Looks like the normal numeric input:

Shortcuts - Apple Watch Entry

Confirmation shows the entry:

Shortcuts - Apple Watch Validate

Validate the new entry made from Apple Watch is in the Health app:

Shortcuts - Validate Apple Watch Entry

Conclusion

By default, the Log Health Sample Shortcut won’t work on Apple Watch, even if it’s numerical input.

By using the Get Numbers in your shortcut, you can use shortcuts that use Log Health Sample on your Apple Watch.

Using this technique, you can build your own Health apps on Apple Watch.