Marrow
EN
App StoreGoogle Play

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

  1. In Marrow, open Connects, then the Exports tab. Turn on Automated, then tap New Automation.
  2. Paste your webhook URL (use HTTPS). Add any headers your receiver checks, such as an Authorization bearer token or an n8n header-auth key.
  3. 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.
  4. 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.
  5. 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

  1. Add a Webhook node. Set HTTP Method to POST and give it a path, such as apple-health.
  2. For a secret, set Authentication to Header Auth and add the same header name and value to the Marrow automation.
  3. Click Listen for test event, then tap Run now in Marrow within two minutes. The payload appears in the editor.
  4. 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 }}

(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

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

More fixes are on the automations reference.

Other ways to do it, and when to pick them

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.

Related: Apple Health to n8n · Apple Health to Home Assistant · the automations reference