Steps → Samlla
- What it measures: the total number of steps from the previous day. Only the date and count go to Samlla.
- Data and permissions: steps are health data. When iOS asks for Health access, allow access to the Steps category only.
- What you need: a Samlla account, consent to processing health data, a read-and-write API key, a “Steps” tracker with one numeric metric whose unit is “steps”, and an iPhone running iOS 17 or later.
- Protect your API key: do not share the shortcut because it contains the key. You can revoke the key in Samlla at any time.
- If more than one “Steps” tracker exists, the shortcut shows a notification and stops. Remove or rename the duplicate so only one remains.
- Runs on: your iPhone, even while your computer is off. The shortcut uses Health data, where iPhone combines steps from your phone and Apple Watch.
- Time: about 10 minutes.
- What leaves Health: only the date and daily step total. No sample times, sources, locations, or other Health data.
Copy the whole block below and paste it into Claude, ChatGPT, or another AI assistant.
I want to record my total steps from the previous day in Samlla every day.
Give me step-by-step instructions for the Shortcuts app on iPhone. Do not
write code, create a .shortcut file, or execute any requests. Reply in
English. Use exact action names from Apple documentation, in English and
Polish when the names differ.
Steps are health data. When iOS asks for Health access, allow access to the
Steps category only.
Before describing requests to Samlla, read https://samlla.app/llms.txt.
That is the only source of facts about the Samlla API. Do not guess URLs,
methods, headers, fields, or response shapes. Use
https://api.samlla.app/openapi.json only to confirm paths and schemas.
Setup
- The user first creates a “Steps” tracker in Samlla with one numeric
metric and the unit “steps”. The shortcut must not create trackers or
metrics.
- The user pastes a read-and-write API key into the X-API-Key header in the
request action. Never ask for the key in chat or put it in notifications
or logs.
- The shortcut must not be shared: its API key would be shared with it. The
user can revoke the key in Samlla at any time.
- The automation type is “Personal Automation” / “Automatyzacja osobista”; its
trigger is “Time of Day” / “Pora dnia”. Choose it every day at 7:00 in the
iPhone’s timezone. Choose Run Immediately. If that iOS version shows the
older setting, turn off Ask Before Running and choose Don’t Ask. Mark the
instructions as based on iOS 17+.
Read Health
- Use the Find Health Samples action for Steps. The date range is the full
previous local day: midnight at the start of yesterday through midnight
at the start of today. Sum all samples.
- Use only the total. Do not send sample times, individual samples, sources,
locations, workouts, or other Health data to Samlla.
- A valid empty result means 0. A Health read error or missing permission is
not zero: show a notification and stop without a write request.
Tracker and write
- Use the “Get Contents of URL” / “Pobierz zawartość URL” action for every
request to Samlla.
- Fetch trackers through the Public API and find exactly one tracker named
“Steps” with one numeric metric. If it is missing, its metric is invalid,
or more than one tracker matches, show a notification and stop without a
write. When there is more than one “Steps” tracker, tell the user to remove
or rename duplicates so exactly one remains.
- Timestamp yesterday’s entry at local noon with the UTC offset. Compute the
UTC date containing that timestamp, fetch entries for that date and
tracker, then select the entry whose local date is yesterday. If more
than one entry exists for that local day, show a notification and make no
change.
- No entry and a positive total: create an entry. After POST, wait for status
SUCCESS and result.status = success. No entry and a total of 0: create
nothing.
- One existing entry and a changed positive total: update it instead of
adding another. If the value is unchanged, do not write. If an existing
entry is corrected to 0, delete it.
- Do not import or backfill any day other than yesterday. With one daily
write, Free’s 90-day history window and the four-second write interval do
not require a loop or delay.
- Request bodies contain only the tracker and metric IDs required by the
API, the entry date/time, and the step count. Add no notes or other data.
Guide the user through setting the date range, sum, conditions,
notifications, requests, and automation in order. Use the Apple references
below for action names; when a name or capability depends on the iOS version,
state the specific difference instead of guessing.
This is observation, not a goal. Do not add a 10,000-step target, streaks,
thresholds, alerts, or judgments.
Samlla API facts: https://samlla.app/llms.txt
Apple Shortcuts documentation:
- Personal Automation: https://support.apple.com/pl-pl/guide/shortcuts/apd690170742/ios
- Automation triggers: https://support.apple.com/pl-pl/guide/shortcuts/apd932ff833f/ios
- Creating automations: https://support.apple.com/guide/shortcuts/add-automations/apdfbdbd7123/ios
- Health and URL action names: https://support.apple.com/pl-pl/101583
- Find and Filter actions: https://support.apple.com/guide/shortcuts/intro-to-find-and-filter-actions/apd3c845e881/ios
- Filter parameters: https://support.apple.com/guide/shortcuts/add-filter-parameters/apdbdab3433f/ios