Log your sun exposure with an Apple Watch automation ⌚️

Shows a screenshot from the Shortcuts app with “Get Current Weather,” “Get the Device name,” an “If” action set to “If Device Name contains iPad”, then “Show Result,” otherwise “Log Health Sample” and then “Show Alert.”

Here’s a Personal Automation for Apple Watch that I’m running automatically at the start of my Walking workouts – Log UV index:

Gets the current weather at the current location and logs the UV index for the hour into the Health app, then displays it or speaks it back when run via Siri.

Includes “Get Device Name” and an “If” action to account for being run on the iPad, which does not have the Health app and would otherwise fail.

Shows a screenshot from the Shortcuts app with “Get Current Weather,” “Get the Device name,” an “If” action set to “If Device Name contains iPad”, then “Show Result,” otherwise “Log Health Sample” and then “Show Alert.”

I built this because I wanted to track the UV levels I am being exposed to on a daily basis, whether it be too much during the summer or not enough during the winter.

I use this inside a Personal Automation for Apple Watch set to the “Walking” workout type – the Run Shortcut action runs the Log UV Index when the trigger is met as my workout begins. That way, any time I go on an outdoor walk and I begin a Workout, this will log the sun exposure I’m getting into the Health app.

Shows a Personal Automation in Shortcuts set to Apple Watch walking workouts and including one action step for Run Shortcut set to “Log UV Index.”

Since having an Apple Watch and seeing the UV index on my watch faces, I have realized just how strong the afternoon sun in California can be in and, conversely, how little I was actually getting outside during the winter. I also included the “X out of 14” bit to help with the context, since I doubt many people know the bounds of UV index scores ?

Since I already use the Outdoor Walk feature every day, it’s an easy and automatic way to trigger a shortcut reliably – why not log the UV index every time? Some day in the future I might be able to make an interesting insight from having the data saved.

Plus, I may stack on other shortcuts using the “Run Shortcut” action, treating my daily walks as a human-powered hamster wheel for all my Shortcuts Automation needs.

Get the shortcut or view a full screenshot.

Then, to set up the trigger, do the following 10-step process:

  1. Open the Automations tab.
  2. Create a new automation by tapping the + in the top right.
  3. Select “Personal Automation.”
  4. Choose “Apple Watch Workout” under the Event label.
  5. Choose “Walking” from the Workout Type menu, then tap “Next.”
  6. Add “Run Shortcut” from the actions list.
  7. Tap in the empty “Shortcut” field and then choose Log UV Index.
  8. Tap “Done,” then toggle “Ask Before Running” off.
  9. Confirm the “Don’t Ask” option so it will run without asking each time the workout starts.
  10. Tap “Done” to finish the Automation.

Then, go for a walk, start a Workout, and look for the notification!

Posts You Might Like

iPhone 15 Pro Action Button Option for Shortcuts Potentially Revealed in iOS 17 Code »
Code has been found suggesting the Action button is coming to the next iPhone – here’s why I think the Shortcuts support needs to be improved.
Bear 2 launches with new Export Note and Backup actions for Shortcuts on Mac
Bear 2 has launched with a host of new features – and two new Shortcuts actions for Mac users.
New in the Shortcuts Library: Amazon app shortcuts
Amazon updated their iOS and iPadOS apps with App Shortcuts support – I made the set available online so you can add any of them to your widget.
Here’s how to automate iPhone’s always-on display (with Shortcuts) »
9to5Mac has a quick guide on automating the Always On Display for iPhone using Focus modes, the Shortcuts action, and—my addition—Automations.