Apple Shortcut: Save to Markcat
Save the page you’re viewing on iPhone, iPad, or Mac to Markcat from the Share Sheet — one tap, no extension required.
What you get
- A Share Sheet action named “Save to Markcat”.
- Tap it on any web page in Safari, Mail, Messages, etc. → the URL is sent to your Markcat account and classified automatically.
- A discreet notification confirms the save (or warns if it failed).
What you’ll need
- iOS 15+ (or macOS 12+) — anything that runs the modern Shortcuts app.
- Your Markcat account (cloud or self-hosted).
- A Personal Access Token (PAT). Create one in the web app under Settings → Devices & Shortcuts → Personal Access Tokens and name it “Apple Shortcut”. Copy the token string — it’s shown only once.
One-tap install (when published)
If the Install “Save to Markcat” on iPhone button is visible in Settings → Devices & Shortcuts, tap it. iOS opens the shortcut, asks you to paste your PAT and confirm the API URL, and adds it to your library. Skip to Using the shortcut.
If the button isn’t there yet, build it manually following the recipe below — it’s four actions and takes about a minute.
Manual build (recipe)
Open the Shortcuts app and tap + to create a new shortcut.
1. Receive a URL from the Share Sheet
- Tap (i) at the bottom-right of the editor → Show in Share Sheet: on.
- Share Sheet Types: leave only URLs checked.
- Add the action Receive [URL] from input at the top — Shortcuts usually inserts it for you when you toggle the share-sheet option.
2. Store your PAT in a variable
Add the action Text with your token as the value (paste the long string
that starts with mc_). Then add Set Variable named PAT with the
output of the Text action as input.
Why a variable: keeps the token out of the URL action below where it would be more visible to anyone editing the shortcut later.
3. POST the URL to Markcat
Add the action Get Contents of URL and configure it:
- URL:
https://api.markcat.app/api/bookmarks(self-hosted: replace with your service URL, e.g.http://localhost:8080/api/bookmarks) - Method:
POST - Headers: tap + twice and add:
Authorization→Bearerfollowed by the PAT variable (use the variable picker so the token is interpolated, not pasted).Content-Type→application/json
- Request Body: select JSON, then build:
Use the variable picker forurl: <Shortcut Input> source: apple_shortcut<Shortcut Input>so it pulls the URL the Share Sheet handed in.
4. Confirmation notification
Add Show Notification with body:
Saved to Markcat: <Contents of URL>
If you want explicit error handling, wrap the Get Contents of URL action in If → Otherwise and show a different notification when the HTTP status isn’t 2xx. Optional polish.
Naming and saving
Name the shortcut Save to Markcat. Pick the markcat icon from the icon picker if you imported the design assets, otherwise any folder/bookmark glyph works. Tap Done.
Using the shortcut
In Safari (or any app), open the page you want to save → tap the Share
icon → scroll the action list → tap Save to Markcat. A notification
confirms within a second or two. The bookmark appears in Markcat with
source = "apple_shortcut" for clean filtering later.
Sharing the shortcut from your device
If you build the shortcut and want to share the same recipe with another person (or paste it back to the project so the install button works for everyone):
- Open Shortcuts → long-press Save to Markcat → Share → Copy iCloud Link.
- Paste the link into the project’s
markcat-app/src/pages/Settings.tsxconstantAPPLE_SHORTCUT_ICLOUD_URL. The install button replaces the manual-build hint automatically.
iCloud links remain valid until the original author deletes the shortcut from their library. Until then anyone with the link can install with one tap.
Troubleshooting
- “This shortcut can’t be opened” on install — iOS 15+ requires
shortcuts be either signed by Apple or installed from an iCloud link by
someone you trust. The iCloud-link path skips the prompt; the unsigned
.shortcutfile path doesn’t. - 401 Unauthorized notification — your PAT was revoked or copied incorrectly. Generate a fresh one in Settings and replace the Text action’s value.
- 403 Forbidden — the PAT scope doesn’t allow bookmark writes.
Re-create the token; the default scope is
bookmarks:write. - Saves succeed but no classification — local mode without an LLM
configured, or you’re out of credits in cloud mode. Check the bookmark
in the web app: status
extractedmeans it saved fine but classification is parked. - Self-hosted with HTTPS not configured — point the shortcut at the HTTP URL on your LAN. The app supports HTTP for local-network use.
API reference
The shortcut hits one endpoint:
POST /api/bookmarks
Authorization: Bearer <PAT>
Content-Type: application/json
{
"url": "https://example.com/article",
"source": "apple_shortcut"
}
A 200 response returns the created (or upserted) bookmark dict. The PAT
scope bookmarks:write is enforced server-side; PATs cannot be used for
auth/account routes.