Apple Health to Google Sheets: a sheet that fills itself
To get Apple Health data into Google Sheets, an iPhone app has to send it, because Apple Health has no API Google can read. With Marrow there are two free ways: post each day's numbers to a small Apps Script web app on a schedule, so the sheet fills itself, or make a CSV in the app and import it once.
Both ways are below, with the columns you get and the usual fixes. We make Marrow. These steps match Marrow 1.7.1.
1. A sheet that fills itself (Apps Script)
You need a Google account. Nothing else runs in between: Marrow posts straight to a script that lives in your own sheet.
- In Google Sheets, make a new sheet. Open Extensions, then Apps Script.
- Replace the code with the recipe, and change
SECRETto a long random string of your own. - Click Deploy, then New deployment, and choose Web app. Set Execute as to Me and Who has access to Anyone, then deploy and approve the permission prompt. Anyone with the address can only call the script. Nobody can read the sheet through it.
- Copy the web app URL. It ends in
/exec. - In Marrow, open Connects, then the Exports tab, and tap Google Sheets. Turn Automated on and tap New Automation.
- Under Address, paste the URL, then add
?key=and your secret. It looks likehttps://script.google.com/macros/s/…/exec?key=…. Apps Script cannot read headers, which is why the secret goes in the address. - Under Data, leave Data type on Health metrics, Format on JSON and Shape on Nested. Under Cadence, pick how often it runs. Once a day is plenty for a sheet.
- Tap Run now. Rows appear in a tab named Marrow.
What arrives
One row per metric per day, in the unit Apple Health stores. Sample values:
| received_at | metric | units | date | qty | extra |
|---|---|---|---|---|---|
| 2026-11-06 09:00 | step_count | count | 2026-11-05 | 8746 | |
| 2026-11-06 09:00 | body_mass | kg | 2026-11-05 | 81.3 | |
| 2026-11-06 09:00 | heart_rate | bpm | 2026-11-05 | {"Avg":71,"Min":52,"Max":148} | |
| 2026-11-06 09:00 | sleep_analysis | h | 2026-11-05 | {"totalSleep":7.4,"deep":1.1,"rem":1.6,"core":4.7} |
The script reads the same JSON every Marrow automation sends, shown on the automations reference:
{"data": {"metrics": [
{"name": "step_count", "units": "count",
"data": [{"date": "2026-11-05", "qty": 8746}]},
{"name": "heart_rate", "units": "bpm",
"data": [{"date": "2026-11-05", "Avg": 71, "Min": 52, "Max": 148}]}
]}}
Two things to know. The date range Since last run sends the last two days again on purpose, because Apple Health keeps filling in a day after it ends, so the same metric and date can appear more than once. To keep the newest, sort by received_at with the newest first, then use Data, Data cleanup, Remove duplicates on the metric and date columns. And the recipe handles health metrics. Workouts, lifting sets and meals arrive in the same request shape, so a few more lines of script can add tabs for them.
2. Import a CSV once
For a one-time look at your numbers, skip the script.
- In Marrow, open Connects, then the Exports tab, then Manual.
- Under Daily metrics, set Range and choose CSV or CSV (long) as the Format, then tap Create export.
- Share the file to Google Drive.
- In Sheets, open File, then Import, and pick the file.
CSV has one row per day and one column per metric. CSV (long) is date,metric,value,unit, which is the shape a pivot table wants. Every file is described on the files reference.
If it does not work
- No rows after Run now. Open the Apps Script project and click Executions at the left. Each POST shows there with any error.
- Delivered, yet no rows. The recipe answers forbidden when
?key=does not match itsSECRET, and Marrow still sees a success. Check the key at the end of the address. - Script changes do nothing. Deploy, Manage deployments, edit the active deployment, pick a new version and Deploy. The
/execaddress keeps running the old version until you do. - The address ends in /dev. That one runs only for people with edit access who are signed in. Marrow needs the
/execaddress. - The script never runs. In the deployment, Who has access must let anyone reach it without signing in.
- An imported file shows one long column. Import it again and choose comma as the separator.
- Runs come late. iOS picks the moment for background work, and a phone that stays locked sends when it is next unlocked. When automations run explains what to expect.
Questions
Is it free?
Yes. Automations and file exports are on Marrow's free plan, and Apps Script is free with a Google account. An automation that is on counts as one of the free plan's three connections.
Does the sheet update with the app closed?
Yes. Automations run in the background at the moments iOS allows, usually several times a day.
How far back can it go?
As far as Marrow has read. That is three years of Apple Health history by default, and Settings, Data types, Apple Health history extends it to five years, everything, or from a date. For a first load, set the automation's date range under More options, run it once, then set it back to Since last run.
Can Google see my health data?
The rows live in your own Google Sheet, under your Google account's terms. Marrow sends them from your phone to your script and keeps no copy on a server of ours.
Other ways to do it, and when to pick them
- Health Auto Export saves CSV files to Google Drive on a schedule with its Premium tier. Pick it if a folder of files in Drive is what you want, or if you also use its Mac and iPad apps. Our comparison has the detail.
- n8n, Zapier or Make. Post to a webhook and let the tool append rows with its own Google Sheets step. Pick it if you already use one of them and would rather not keep a script. Steps: n8n, Zapier, Make.
- Apple's export.zip. For your whole history once, export from the Health app, turn it into CSV with our converter in your browser and import the files. It is a snapshot, so new data means a new export.
- Apple Shortcuts can post a few health samples to the same web app. Pick it for one or two numbers a day when you do not mind building each one.
Related: Apple Health to CSV · Apple Health to a webhook · the automations reference