Skip to content

Health ​

Health data and workouts.

import Health;

endWorkout ​

Ends the active workout on your Apple Watch.

endWorkout()

Shortcuts action: is.workflow.actions.workout.end

findHealthSamples ​

findHealthSamples(sortBy: Enum, order: Enum, WFContentItemLimit: Boolean, WFContentItemLimitNumber: Number) -> HealthSample
ParameterTypeDefault
sortByName | Type | Value | Start Date | End Date | Duration | Source—
orderLatest First | Oldest First—
WFContentItemLimitBooleanfalse
WFContentItemLimitNumberNumber5

If you only see some but not all of your data in the results, make sure that “Allow Shortcuts to read data” is set to on in the Health app.

Shortcuts action: is.workflow.actions.filter.health.quantity

getDetailsOfHealthSample ​

getDetailsOfHealthSample(get: Enum) -> Any
ParameterTypeDefault
getName | Type | Value | Start Date | End Date | Duration | Source—

Shortcuts action: is.workflow.actions.properties.health.quantity

logHealthSample ​

Adds a data point into the Health app. You can log anything that the Health app supports, including your weight, steps taken, running distance, caloric intake and more.

logHealthSample(type: Text, WFQuantitySampleQuantity: Number, WFQuantitySampleAdditionalQuantity: Number, reason: Text, WFCategorySampleEnumeration: Text, WFCategorySampleAdditionalEnumerationKey: Text, date: Text, endDate: Text) -> HealthSample
ParameterTypeDefault
typeText—
WFQuantitySampleQuantityNumber—
WFQuantitySampleAdditionalQuantityNumber—
reasonText—
WFCategorySampleEnumerationText—
WFCategorySampleAdditionalEnumerationKeyText—
dateText—
endDateText—

Shortcuts action: is.workflow.actions.health.quantity.log

logWorkout ​

Adds a workout into the Health app. You can log all kinds of activities, from running and cycling to playing a sport.

logWorkout(type: Text, date: Text, duration: Number, calories: Number, distance: Number) -> HealthSample
ParameterTypeDefault
typeText—
dateText—
durationNumber—
caloriesNumber—
distanceNumber—

Shortcuts action: is.workflow.actions.health.workout.log

startWorkout ​

Starts a workout on your Apple Watch.

startWorkout(type: Text, openGoal: Boolean, value: Number)
ParameterTypeDefault
typeText—
openGoalBooleantrue
valueNumber"15"

Shortcuts action: is.workflow.actions.workout.start