Add Append/Prepend option to Obsidian URI

Create an action for the Obsidian URI that allows you to append/prepend content to an existing note.

Use case or problem

Sometimes you want to simply add more content to an existing note. This is particularly useful for the daily notes. For example, I create my note, but at the end of each day I run a script that asks me to reflect on my day. I’d like to automatically add these answers to the end of my already existing daily note.

Proposed solution

This action can work just like the NEW action, but looks for an existing file and has the option to append or prepend the text to the document.

Current workaround (optional)

Right now my solution is to run my script, copy the text to the clipboard, run the URI with the command to open my daily note, and then I manually paste it into my document.

8 Likes

For the workaround: couldn’t your script append the text to the file directly before opening obsidian?

Most of my scripts/shortcuts are run on iOS, and with app sandboxing that’s not an option. If I were running it on Mac, it wouldn’t be an issue at all.

My new plugin solves that

3 Likes

Thanks @Vinadon! It’s downloaded on my iPad & I updated my shortcut, so I’ll give it a try this evening when I run my daily reflection shortcut.

Hi @Vinadon thanks for creating that awesome plugin.

I’m wondering if you’re able to have a mode where prepend will work even if the file doesn’t exist.

Use case. I write stuff in Drafts and I want to be able to send it to Obsidian. If the file already exists, I want to prepend the data, but if the file doesn’t exist I want to create it.

Thanks for the hint. Fixed in 1.4.1

1 Like

Amazing! Thanks for the quick turnaround!

Does your plugin work on iOS? I tried installing it, but when I try to enable the plugin on my iPhone, it says it failed to load. ¯\_(ツ)_/¯

@Vinadon apologies for the false alarm—seems there was something wonky on my end. I got it working on iOS!

1 Like