Pragmatism in today's world

Appending text to Obsidan via Shortcuts

Sometimes it’s helpful to add some text to my current Obsidian daily note without having to switch to Obsidian, find the daily note and then type my text.

To do this, we can use the magic of Obsidian’s obsidian:// URI schema and automate the text capture in Apple Shortcuts, with an assigned keyboard shortcut to activate it.

This is the Shortcut:


Add to daily note obsidian shortcut light.

There’s a number of steps in the Shortcut. Firstly we Ask For some text which will display a dialog box for us to type in. Then we Replace any trailing whitespace, add then use a Text action to prepend the current time as a third level heading. This is the text to be added, so we URL Encode it and use another Text action to create the full obsidian:// URI to be Opened.

The URI is:

obsidian://daily?vault=General&append=1&content={URL Encoded Text}

The daily endpoint only works if the Daily notes core plugin is enabled. We then need to specify which vault we’re using. The content is the URL encoded text to be appended and the append parameter tells obsidian to place the text at the end of the note.

I’ve assigned it to ⌃⌥⌘= and pressing that key combination runs it for me.

Now I have a simple way to add some text to the current note without interrupting my context.

If this shortcut would be useful to you, you can download it here.

Thoughts? Leave a reply

Your email address will not be published. Required fields are marked *