Open Today's Note from anywhere on macOS with Keyboard Maestro or Alfred

This is a trivial macro to build, but just in case someone else hasn’t considered it, I thought I’d share it here.

If you’re on macOS, Keyboard Maestro is an incredibly powerful automation tool. This little macro simply uses the keyboard shortcut assigned to Today’s Note to open it in Obsidian, and will work even if you’re currently working anywhere else on the OS.

Here’s what it looks like:

Using Keyboard Maestro’s URL triggers, it’s pretty easy to activate the macro via e.g., Alfred or a Stream Deck button. You could also trigger it via KM’s other options, of course.


If you use Alfred, you can also do this without Keyboard Maestro. Create a workflow that upon triggering launches Obsidian, delays for a brief moment (I used .2s), and then dispatches the appropriate Open Today’s Note keypress.

See the workflow here.

11 Likes

It will be beautiful if you edit the post and share directly the extension :smile:

For some reason the Obsidian will open, but daily note will not. :man_shrugging:t3:
I ensured that shortcut for new note inside Obsidian is same like in Keyboard maestro (CMD+T) and manually pressing it it will open today’s note.

When obsidian is already open the daily note will open… is there any smart wait command between opening app to wait for app to open, and then press the key?

I use BetterTouchTool for this, with two assigned actions:

  • Launch Obsidian
  • Send shortcut to Obsidian
2 Likes

There is a Wait action in Keyboard Maestro. It isn’t smart, but sometimes I’ve had luck getting macros to run by inserting “Wait .3 seconds” or similar.

Im lucky with 3 seconds :scream:

1 Like

ha oh dear. Your processor needs to work out more or something! Is it 3s even if Obsidian’s already launched, just backgrounded?

1 Like

It is 3 seconds when lunched from scratch.

  • I have macbook 12’ so definitely not so fast machine.
1 Like

You could probably do something like:

If Obsidian is Open
    Launch Obsidian
    Wait .3 s
    Enter keystrokes for open today’s note
Else
    Launch Obsidian 
    Wait 3 s
    Enter keystrokes for open today’s note

Would be a little more fluid!

Correct! I was thinking to do that. Wait 3 seconds for nothing is luxury :slight_smile: It is pretty easy to implement in Keyboard meastro, Im just checking it. Thank you for your help!

1 Like

Have you tried the “Pause Until” action? This allows you to pause until a specific condition is met. One of which could be “Obsidian is running && at the front”.

I use AutoHotKey on Windows.

My hotkey for the daily note is STRG+T.

Use STRG+ALT+N to open the today’s note with the following script:

^!n::
if WinExist("ahk_exe Obsidian.exe")
	WinActivate
else {
	Run C:\Users\joe\AppData\Local\Obsidian\Obsidian.exe
	sleep, 1000 ; wait 1000/1000 seconds
}
Send ^t
return
1 Like

Thank you so much for the Alfred workflow. Very useful