---
title: "Deep links & automation"
---

Mimir responds to its own `mimir://` links. Another app, such as
Shortcuts, Drafts, or a script, can open a page, add text to today's
journal, or read a page back out. You don't need to open Mimir first.
To bring a whole collection of notes in this way, see
[Importing notes from another app](/importing-notes-from-another-app).

## The mimir:// links

| Link | Does |
| --- | --- |
| `mimir://open?page=<title>` | Opens a page, creating it if it doesn't exist. |
| `mimir://append?text=<text>&page=<title>` | Adds text to a page, creating it if it doesn't exist. |
| `mimir://append?text=<text>` | Adds text to today's journal. |
| `mimir://get?page=<title>` | Reads a page's text back out. Doesn't create a missing page. |
| `mimir://find?query=<text>` | Opens the search palette with your text already typed in. |

`<title>` and `<text>` are placeholders. Put your own page title or text
there, URL-encoded.

Leaving `text` out of an `append` link pastes the clipboard instead. This
helps when the text is too long to fit in a URL.

### Getting a result back

`open`, `append`, and `get` all accept `x-success` and `x-error`
parameters. They follow the [x-callback-url](http://x-callback-url.com/)
convention that Shortcuts, Drafts, and similar apps use. When the command
finishes, Mimir calls the URL in `x-success`. If it fails, Mimir calls the
URL in `x-error`.

`get` masks any text between tildes (`~like this~`) before handing it back,
the same masking you see on screen.

## Using Mimir with Shortcuts

This builds a shortcut that adds whatever you type to today's journal,
from anywhere on iOS or Mac.

1. Open the Shortcuts app and create a new shortcut.
2. Add an **Ask for Input** action, set to Text.
3. Add a **URL-Encode** action for the input from step 2.
4. Add a **URL** action.
5. Set it to `mimir://append?text=` followed by the encoded text from
   step 3.
6. Add an **Open URLs** action using that URL.

Run the shortcut, type a line, and it lands in today's journal.

The same pattern works with `open`, `get`, and `find`. See
[the table above](#the-mimir-links) for what each one accepts.
