Apple Health to a webhook: send it on a schedule, free
To send Apple Health data to a webhook, you need an iPhone app that posts it, because Apple Health has no web API. Marrow does this for free: an automation POSTs your health metrics, workouts, strength sets, food diary, or symptoms and mood to any URL, as JSON or CSV, on the schedule you pick, with the app closed.
Below are the setup, the payload, working receivers for n8n, Home Assistant and a plain server, the usual fixes, and the other ways to do the same job. We make Marrow.
Set up the automation
- In Marrow, open Connects, then the Exports tab. Turn on Automated, then tap New Automation.
- Paste your webhook URL (use HTTPS). Add any headers your receiver checks, such as an
Authorizationbearer token or an n8n header-auth key. - Pick the kind of data: Health metrics, Workouts, Strength log, Nutrition diary, or Symptoms and mood. One automation sends one kind, and you can have up to ten.
- Pick JSON or CSV and how often it runs, in minutes, hours or days. The date range (Since last run is the default) is under More options.
- Turn it on and tap Run now to send a first payload while you watch the receiver.
Each request is a POST with Content-Type: application/json (or text/csv) and your headers. Every run, with its response code, is listed in the automation's history in the app.
What arrives
Health metrics arrive as daily totals, in the unit named in units. Heart rate comes as each day's average, minimum and maximum, and sleep as each night with its stages, in hours:
{"data": {"metrics": [
{"name": "body_mass", "units": "kg",
"data": [{"date": "2026-09-11", "qty": 81.3}]},
{"name": "step_count", "units": "count",
"data": [{"date": "2026-09-11", "qty": 8746}]},
{"name": "heart_rate", "units": "bpm",
"data": [{"date": "2026-09-11", "Avg": 71, "Min": 52, "Max": 148}]},
{"name": "sleep_analysis", "units": "h",
"data": [{"date": "2026-09-11", "totalSleep": 7.2, "asleep": 7.2, "deep": 1.1, "rem": 1.6, "core": 4.3, "awake": 0.2,
"sleepStart": "2026-09-10 23:36:00 -0400", "sleepEnd": "2026-09-11 07:02:00 -0400"}]}
]}}
The workout, strength, nutrition and mood payloads, raw samples instead of daily totals, and the CSV layout are on the automations reference.
Nested or Rows
JSON comes in two shapes, picked under Shape. Nested is the layout above and the one this page's receivers read. Rows is one flat list with a record per value, which the field pickers in n8n, Zapier and Make read in one click. An automation you make from one of those tools' pages in Connects starts with Rows:
{"source": "marrow", "kind": "metrics", "sent_at": "2026-11-06T14:00:00Z",
"rows": [
{"metric": "step_count", "units": "count", "date": "2026-11-05", "value": 8746},
{"metric": "heart_rate", "units": "bpm", "date": "2026-11-05", "value": 71, "min": 52, "max": 148}
]}
Receive it in n8n
- Add a Webhook node. Set HTTP Method to
POSTand give it a path, such asapple-health. - For a secret, set Authentication to Header Auth and add the same header name and value to the Marrow automation.
- Click Listen for test event, then tap Run now in Marrow within two minutes. The payload appears in the editor.
- Publish the workflow and point Marrow at the Production URL (the one with
/webhook/, not/webhook-test/). The test URL stops listening after a test.
The payload is under body, so today's steps are {{ $json.body.data.metrics.find(m => m.name === 'step_count').data.at(-1).qty }} in an expression. Add a Split Out node on body.data.metrics to handle each metric as its own item. n8n accepts payloads up to 16 MB by default, which covers years of daily totals. Production runs show under Executions, not in the editor. (n8n Webhook docs)
Receive it in Home Assistant
If all you want is your numbers as sensors, skip the webhook. Since Marrow 1.7 the Home Assistant connection writes sensors directly with your address and a long-lived access token, and there is no YAML to edit. Use a webhook when you want a trigger that starts an automation the moment data arrives.
A webhook trigger takes the POST at /api/webhook/<webhook_id>. This automation stores the latest step count in a number helper called input_number.steps_today (create it first, with a maximum above your best day):
automation:
- alias: "Apple Health from Marrow"
triggers:
- trigger: webhook
webhook_id: "pick-a-long-random-id"
allowed_methods:
- POST
local_only: false
actions:
- action: input_number.set_value
target:
entity_id: input_number.steps_today
data:
value: >-
{{ ((trigger.json.data.metrics
| selectattr('name', 'eq', 'step_count') | first).data
| last).qty }}
- The JSON body is in
trigger.jsonbecause Marrow sendsContent-Type: application/json. local_onlyis on by default, which accepts posts only from your home network or a Nabu Casa cloud webhook URL. Set it tofalsewhen the phone posts over the internet to your own HTTPS address.- The webhook ID is the only secret, so make it long and random.
(Home Assistant webhook trigger docs)
Receive it on your own server
Any endpoint that accepts an HTTPS POST and answers 2xx works. This one archives every payload to a file:
from http.server import BaseHTTPRequestHandler, HTTPServer
import time
class H(BaseHTTPRequestHandler):
def do_POST(self):
body = self.rfile.read(int(self.headers.get("Content-Length", 0)))
with open(f"marrow-{int(time.time())}.json", "wb") as f:
f.write(body)
self.send_response(200)
self.end_headers()
HTTPServer(("0.0.0.0", 8798), H).serve_forever()
Put it behind HTTPS with a Cloudflare Tunnel, Tailscale Funnel or a reverse proxy. If you would rather have a queryable database than a folder of files, Marrow's self-hosted mirror is that receiver already written, and AI agents can query it too.
No receiver at all: InfluxDB and Grafana Cloud
For a database or a dashboard you no longer need a webhook in the middle. Marrow writes straight to InfluxDB with an API token, and straight to Grafana Cloud through its hosted Prometheus metrics. Both are free, and the steps are on the automations page.
Three rules for a receiver that never loses data
- Latest wins. Store each value keyed by metric and day and overwrite on repeat. Since last run re-sends the last two days on purpose, because Apple Health keeps filling in a day after it ends.
- Save the raw body first, then parse it. A parsing bug should never cost you data.
- Answer quickly. Marrow waits up to the timeout you set (60 seconds by default) and retries a failed run from the last successful window on its next turn.
When does it run?
Whenever iOS lets Marrow run: after it syncs with Apple Health, when you open it, and during background refresh, once the interval you chose has passed. iOS decides when background refresh happens, so a phone left locked all day sends when it is next unlocked, and Since last run covers the gap.
If it does not work
- Start with Run now. The line under Run now says what happened. Any 2xx answer counts as delivered. Anything else shows as Server answered with the status code, or the network error.
- Read the Activity log. In the automation, More options, then Activity log lists its last 30 runs with the result of each.
- 404 from n8n. Nothing is listening at that address. The Production URL answers only while the workflow is published, and the Test URL only for one call after Listen for test event.
- 200 from Home Assistant, yet nothing changes. Home Assistant answers 200 even for a webhook ID it does not know. Check the ID at the end of the address, and set
local_only: falsewhen the phone posts from outside your network. - A receiver on your home network. Marrow needs Local Network access to reach it (iPhone Settings, Privacy and Security, Local Network). Tap Run now once with Marrow open so iOS can ask.
- Runs come late. iOS picks the moment for background work, and a phone that stays locked sends when it is next unlocked. Since last run catches up on the next run that succeeds.
- It will not switch on. Each automation that is on counts as a connection: three at a time on the free plan, up to 20 with Pro.
More fixes are on the automations reference.
Other ways to do it, and when to pick them
- Health Auto Export also posts Apple Health data to webhooks, and its metrics JSON has the same structure as Marrow's. Its automations need the Premium tier. Pick it if you also want its Mac and iPad apps, or its MQTT, iCloud Drive, Google Drive and Dropbox destinations, which Marrow does not have.
- Apple Shortcuts can read health samples and post them with Get Contents of URL, on a personal automation at a set time. It is free and already on your iPhone. Pick it for one or two numbers a day. It can only read Health data while the phone is unlocked, and you build and maintain each metric yourself.
- Apple's export.zip is a one-off full backup, not a feed. Pick it for a one-time load of your whole history. To turn one into CSV, use our in-browser converter.
- A direct connection, when the destination is InfluxDB, Grafana Cloud or Home Assistant. Marrow writes those itself, so there is no receiver to build.
Questions
Is there a free app that sends Apple Health data to a webhook?
Yes. Marrow's automations are on its free plan: up to ten of them, three connections on at once, JSON or CSV, with background sync. No account is needed.
Does Apple Health have an API or webhooks of its own?
No. HealthKit lives on the iPhone and has no web API. Data reaches a server only when an app on the phone sends it.
Does it work with Zapier and Make?
Yes. Point the automation at a Catch Hook in Zapier or a custom webhook in Make. Each has its own page with the steps.
How often can it send?
As often as every few minutes on paper. In practice iOS decides when a background app runs, so expect several runs a day rather than an exact clock. When automations run has the detail.
What data can it send?
Health metrics as daily totals or raw samples, workouts, lifting sets, the food diary with 39 nutrients, and symptoms and mood. Marrow reads three years of Apple Health history by default and more if you ask for it in Settings.
Download on theApp StoreGET IT ON
Related: Apple Health to n8n · Apple Health to Home Assistant · the automations reference