I run a small Go HTTP server on my Mac that receives captures from my iPhone and appends them to my Obsidian weekly notes. The server lives behind Tailscale — nothing is exposed to the public internet. This post covers how to build the iOS Shortcut that talks to it.

If you want the server side first, see my earlier post on self-hosted Obsidian sync.

What the Shortcut Does

One tap from your home screen:

  1. Asks you to type or dictate a note
  2. Grabs your current GPS coordinates
  3. Optionally attaches a photo
  4. POSTs everything to your Mac server
  5. The server appends it to this week’s Obsidian note (journal/June 29 - July 5, 2026.md)

If your phone is offline (not on Tailscale), the shortcut saves the capture locally as an outbox file. When your Mac comes back into range, a file watcher picks it up automatically and files it — nothing is lost.

What You Need

  • iOS 16 or later
  • The Shortcuts app (built into iOS, free)
  • Your Mac server running and reachable over Tailscale
  • Your server’s Tailscale IP and capture token

Part 1 — Create the Shortcut

Open Shortcuts and create a new one

  1. Open the Shortcuts app on your iPhone (purple icon with two overlapping squares)
  2. Tap the + button in the top-right corner
  3. Tap the name at the top — it says New Shortcut — and rename it Obsidian Capture
  4. Tap Done

You now have a blank shortcut. Every step below adds one action. Tap Add Action (or the search bar at the bottom) to find each one.


Action 1 — Capture timestamp (your entry ID)

This timestamp becomes both the unique ID for the entry and the base name for any attached media.

  1. Tap Add Action, search for Format Date, tap it
  2. In the action you’ll see: Format [Date] with [Medium]
  3. Tap Medium → choose Custom
  4. In the custom field that appears, type exactly: yyyy-MM-dd-HHmmss
  5. Tap the result chip at the bottom of the action → tap Set Variable → name it T → tap Done

Action 2 — Ask for your note text

  1. Tap +, search for Ask for Input, tap it
  2. Keep the type as Text
  3. Tap the Prompt field → type: What's on your mind?
  4. Tap the result chip → Set Variable → name it CaptureText

Tip: You can swap this for a Dictate Text action if you prefer speaking your notes.


Action 3 — Get GPS location

  1. Tap +, search for Get Current Location, tap it
  2. No configuration needed — it captures your position automatically
  3. Tap the result chip → Set Variable → name it Location

Action 4 — POST to your server

This is the most involved action. Take it one section at a time.

  1. Tap +, search for Get Contents of URL, tap it
  2. Tap the URL field and enter your server address:
    http://<your-tailscale-ip>:8888/capture
    
  3. Tap Show More (the small arrow below the URL) to reveal all options
  4. Change Method from GET to POST

Add the auth header:

  1. Under Headers, tap Add new header
    • Key: Authorization
    • Value: Bearer <your-capture-token>

Set the body format:

  1. Under Request Body, tap the selector and choose Form

Add form fields — tap Add new fieldText for each:

KeyValue
idtap the value field → tap the variable icon → pick T
texttap the value field → pick CaptureText
lattap the value field → pick Location → tap the Location chip → select Latitude
lngtap the value field → pick Location → tap the Location chip → select Longitude

Action 5 — Show the result

  1. Tap +, search for Show Result, tap it
  2. Tap the text field → tap the variable icon → pick Contents of URL

This flashes the server’s response so you know whether it succeeded.


Part 2 — Test it

Tap the Play ▶ button at the bottom of the shortcut editor.

  • Grant location permission when prompted
  • Type a test note and tap Done
  • You should see a response like:
    {"ok":true,"file":"journal/June 22 - June 28, 2026.md","media":0}
    

Open Obsidian on your Mac and look in journal/ — your entry is there with a ## HH:MM heading, your text, and a Maps link for your location.


Part 3 — Add Photo Support

Once the basic version works, go back and add these three actions between Action 3 and Action 4.

New Action A — Select a photo

  1. Tap +, search for Select Photos, tap it
  2. Toggle Select Multiple off
  3. Tap the result chip → Set VariablePhoto

To make the photo optional, wrap this in an If action that checks whether you actually want to attach one — but for simplicity, start without that.

New Action B — Convert to JPEG

  1. Tap +, search for Convert Image, tap it
  2. Set Image to variable Photo
  3. Set Format to JPEG
  4. Tap result chip → Set VariablePhotoJPEG

New Action C — Save photo to vault

  1. Tap +, search for Save File, tap it
  2. Set File to variable PhotoJPEG
  3. Toggle Ask Where to Save off
  4. Tap the destination path and navigate to: On My iPhone → Obsidian → (your vault) → attachments
  5. Tap the filename field → clear it → tap the variable icon → pick T → then type .jpg right after the T chip

Update Action 4 — tell the server about the photo

Go back to the Get Contents of URL action and add one more form field:

KeyValue
media_namevariable T chip + type .jpg (in the same field)

The server will embed ![[attachments/2026-06-28-143022.jpg]] in the note. The file itself arrives via LiveSync.


Part 4 — Add to Home Screen

  1. Tap the settings icon (two sliders) at the top of the shortcut
  2. Tap Add to Home Screen
  3. Pick an icon and name → tap Add

One tap anywhere on your home screen now fires a full capture.


How the Offline Fallback Works

The shortcut above posts directly to your Mac. If your Mac is unreachable (you’re off Tailscale, or the server is down), the POST fails and you get an error.

The more robust version — which I use — adds two extra steps before the POST:

  1. Build a small markdown file with your capture data and save it to _outbox/T.md inside your Obsidian vault on your phone
  2. After a successful POST, delete that file

If the POST never succeeds, the outbox file stays on your phone. LiveSync eventually syncs it to your Mac, and a file watcher on the server picks it up, folds it into the correct weekly note, and deletes it. Your capture is never lost, even if you were completely offline when you made it.

The outbox file format the server expects:

---
id: 2026-06-28-143022
lat: 37.3346
lng: -122.0090
media_name: 2026-06-28-143022.jpg
---
Your capture text here.

Result

Every capture from your iPhone lands in your Obsidian weekly note within seconds, formatted like this:

## 14:30
<!-- cap:2026-06-28-143022 -->

Picked up coffee beans from Blue Bottle. The Ethiopia natural is back.

![[attachments/2026-06-28-143022.jpg]]

📍 [37.3346, -122.0090](https://www.google.com/maps?q=37.3346,-122.0090)

---

The <!-- cap: --> marker is invisible in Obsidian’s preview and makes every capture idempotent — if the shortcut fires twice with the same ID, the server silently ignores the duplicate.