Open Obsidian Document

I am so sorry if this has been asked before, it seems like it should be easy. I want to open a specific Obsidian document from a Keyboard Maestro action. I thought open URL with the percent decoded URL copied from Obsidian would work, but I can't get it to.
Screen Shot 2021-06-29 at 4.30.41 PM

Hi @debmundo - welcome to the KM forum.

You're very close. This works for me:
KM 0 2021-06-30_09-59-05

(specify Obsidian as the app to use, not the default app). But you have to percent encode the URL - the KM Filter action can do that for you. Try this:
KM 1 2021-06-30_10-06-05

1 Like

Thank you so much for responding. The copied URL from Obsidian is percent encoded, I had converted it. And, I am able to open the URL that worked for you (if I had a start here document) once I change the application. The file I wanted to use, however still isn't working. I think it might be in my file naming... perhaps too long or unsupported characters.
CleanShot 2021-06-30 at 07.46.28

Can you post the file URL here in full - both before and after percent encoding?

Hi @debmundo. Just for the benefit of those who look at this in the future - did you find a solution to your problem?

I am having this issue as well and I think one problem is KM's handling of special characters. If I copy the Obsidian URL from a note file that has no special characters it works but my main note is called › Init and many other notes that I will want to create macros for will have special characters or even emojis. This will be common as Obsidian community (and others) encourages using special chars. I think @debmundo 's issue is with the em-dash in your file name.

My is encoded as %E2%80%BA and works outside of KM. So... is this a KM bug?

1 Like

Until this is fixed, you can launch the URL as a shell script:

Replace just OBSIDIAN NOTE URL with your note's url. E.g.: open "obsidian://open?vault=_Notes&file=%E2%80%BA%20Init"

Sorry for the delay... I did not find a solution for this but it does seem to be specific to the URL I was using.
Here's one that doesn't work:


And one that does:


The hyphen in the file name seems to cause problems. I can just change the file name.