Marrow
EN
App StoreGoogle Play

Connects / Exports / Data and dashboards

Apple Health to InfluxDB: write it straight from your iPhone

Automated

To get Apple Health data into InfluxDB, an iPhone app has to write it there, because Apple Health has no API a server can call. Marrow does this for free: give it your InfluxDB address, bucket and an API token, and it writes every metric, workout, lifting set and meal in line protocol on a schedule, with no Telegraf or bridge in between.

Open in Marrow works on an iPhone with Marrow 1.7.1 or later.

Automated Free

Marrow writes to it directly on a schedule, with the app closed. Nothing to run in between. You need: An InfluxDB API token with write on one bucket.

  1. In Marrow, open Connects, then Exports, and tap InfluxDB. Turn Automated on.
  2. In InfluxDB: Load Data, API Tokens, Generate, write to one bucket.
  3. In Marrow: tap Connect. Its page asks for:
    • Address: Where InfluxDB answers, with its port. It looks like https://influx.example.com:8086.
    • Organization: Your org's name. InfluxDB 1.8 and 3 do not need one.
    • Bucket: The bucket the token can write to, for example health.
    • API token: The token you just made.
    Tap Test connection, then Done. Marrow writes every hour unless you change it under Advanced, where you also pick the kinds of data and how far back the first run reaches (90 days unless you change it).

What arrives in InfluxDB

Marrow writes seven measurements to your bucket in InfluxDB's line protocol. Every field is a float, so a field never changes type. Timestamps are in seconds, and a day's total is stamped at noon UTC of that day. These lines use sample values:

daily,metric=step_count,units=count qty=8746.0 1793880000
daily,metric=heart_rate,units=bpm Avg=71.0,Min=52.0,Max=148.0 1793880000
daily,metric=sleep_analysis,units=h totalSleep=7.4,deep=1.1,rem=1.6,core=4.7 1793880000
sample,metric=heart_rate,units=bpm,source=Apple\ Watch value=71.0,dur_s=0.0 1793883900
workout,activity=Running,source=Apple\ Watch duration_min=31.0,kcal=312.0,distance_mi=3.1,avg_hr=151.0 1793917800
set,exercise=Bench\ Press,session=Push\ day,set_type=work,unit=lb,n=2,muscle=Chest weight=185.0,reps=8.0,e1rm=231.0,volume=1480.0 1793900400
meal,day=2026-11-05,idx=3,meal=lunch kcal=640.0,protein_g=42.0,carbs_g=55.0,fat_g=28.0,grams=320.0,food="Chicken burrito" 1793883900
MeasurementTagsFields
dailymetric, unitsqty for totals, Avg, Min and Max for heart rate, totalSleep and the stages for sleep
samplemetric, units, source, stage for sleepvalue, dur_s
workoutactivity, sourceduration_min, kcal, distance_mi, avg_hr
setexercise, session, set_type, unit, n, muscleweight, reps, e1rm, volume, rir
mealday, idx, mealkcal, protein_g, carbs_g, fat_g, grams, food, and each nutrient as n_ and its name
symptomname, severity, sourceseverity_code, dur_s
moodkind, sourcevalence, feeling

The first run sends the last 90 days unless you pick 30 days, 365 days or All under Advanced, History. Later runs send what is new and send the last two days again, because Apple Health keeps filling in a day after it ends. A point with the same measurement, tags and time overwrites the old one, so nothing doubles. Raw samples is on for InfluxDB. Turn it off under Advanced if you only want the daily totals.

Query it

Steps per day for the last month, in InfluxQL and in Flux:

SELECT "qty" FROM "daily" WHERE "metric" = 'step_count' AND time > now() - 30d
from(bucket: "health")
  |> range(start: -30d)
  |> filter(fn: (r) => r._measurement == "daily" and r.metric == "step_count" and r._field == "qty")

Built with InfluxDB

Made something? Add it to Built with Marrow.

If it does not work

In InfluxDB

Automated checks

More fixes in the guides: Automated.

Questions

Do I need Telegraf, a bridge or a server in between?

No. Since Marrow 1.7 the app writes InfluxDB's own write API itself. You only need InfluxDB to be reachable from the phone over https, or over plain http on your own network.

Which InfluxDB versions work?

InfluxDB 1.8, 2, 3 and InfluxDB Cloud. On 1.8 there is no organization, the bucket is the database and retention policy as db/rp, and the API token is user:password.

How often does it write?

Every hour unless you change it under Advanced. iOS picks the exact moment for background work, so expect several runs a day, not an exact clock. When automations run has the detail.

Is it free?

Yes. The InfluxDB connection is on Marrow's free plan and counts as one of its three connections. No account is needed.

Can I chart it in Grafana?

Yes. Point a Grafana InfluxDB data source at the same bucket. Apple Health to Grafana has the queries.

Other ways to do it, and when to pick them

We make Marrow, so here are the alternatives as fairly as we can put them.

Related: Apple Health to Grafana · Apple Health to a webhook · Automations: every payload

More help

More Data and dashboards