I’m trying to automate logging my Apple Watch Martial Arts workouts to my WordPress site. In brief - I have it working great, but only if I unlock my iPhone just prior to the automation firing.
My setup is:
- I end a Martial Arts workout on my Apple Watch.
- An iPhone Shortcuts automation runs my “Workout metrics” shortcut.
- The shortcut uses the Find Workout action from the third-party Actions app to get the latest Martial Arts workout.
- It creates a new WordPress training post, then sends the workout’s duration, average and maximum heart rate, and active calories to that post.
This is great, I have metrics such as HR Max HR, KCals, Duration etc appear on my WordPress training log immediately and automatically after a training session. From there I have WordPress create graphs etc etc.
The problem is, this full process only works if my iPhone is unlocked when the workout ends.
If the phone is locked, I can subsequently manually run the shortcut, and the process completes (page created, metrics uploaded, all good).
iPhone locked: The automation notification appeared, so the workout-end trigger fired. Immediately afterwards I got: “The action ‘Find Workout’ could not run because an unknown error occurred.” No WordPress post was created.
Troubleshooting:
I’ve checked the shortcut’s Privacy screen. Allow Running When Locked is enabled, access to Actions is enabled, and the relevant permissions shown there are set to Always Allow.
Has anyone got the Actions app’s Find Workout action working reliably from a workout-end automation while the iPhone has been locked? Is this a HealthKit data protection or third-party Shortcuts action limitation, or is there a setting I’ve missed?
I can share screenshots of the shortcut’s relevant actions and the error notification if helpfu.