Macro: Capture to Inbox with GPS
This macro asks for a quick note, looks up your device location at the same
time, and appends a timestamped line to Inbox.md. It is meant for capture on
the go: voice-to-text in the prompt, GPS in the background, one line waiting
when you get home.
GPS works on Obsidian mobile 1.11 or newer. The first run asks Android or iOS for location permission. Desktop cannot read GPS, so the line is still saved, just without coordinates. A cold satellite lock while offline can take a while; if it times out, the note is saved without GPS.
This is not a built-in {{coordinates}} token. A capture format that calls
{{MACRO:...}} would wait for GPS before opening the prompt, which fights
voice-to-text. The script starts the location lookup first, then prompts.
Install from the package
Section titled “Install from the package”The package at the top of this page writes scripts/captureInboxGps.js and a
Macro choice that runs it. After importing, open the cog on the script step to
change the Inbox path (default Inbox.md) or to turn off creating the note
when it is missing. Then assign a hotkey to Capture to Inbox with GPS, or
run it from the command palette.
Install by hand
Section titled “Install by hand”- Save captureInboxGps.js
anywhere in your vault except
.obsidianor a hidden folder. - In Settings → QuickAdd, click New choice → Macro. The Macro
Builder opens; click its name at the top to rename it
Capture to Inbox with GPS. - In the Macro Builder, add that script as a User Script.
- Turn on the ⚡ Command palette toggle on the choice’s row so it appears in the palette.
What you get
Section titled “What you get”Each run appends one line:
- 2026-08-31 15:42 Saw the trail marker at the ridge (55.676098, 12.568337)If GPS is unavailable, the same line is written without the coordinates.
A run that already has value and coordinates set (URI, CLI, or an earlier
macro step) skips the prompt and the location lookup.