Alfred - Obsidian Utilities

Hi.

Ever since I started using Obsidian, I’ve been setting up some Alfred automations that allow me to use the app more efficiently. The workflow was messy and hardcoded with my own info, but I’ve cleaned it up and it’s ready to share.

Obsidian Utilities

Usage

v (no arguments)

Open vault folder in VS Code

s [search tearms]

Search note titles and contents with Alfred.
Open results in Obsidian or VS Code (Cmd modifier)

j [journal entry]

Append journal entry to daily note. Adds timestamped heading and journal tag.

n [entry]

Append entry to daily note.

t [task]

Appends tasks to tasks file, under the configured heading. Prefixes tasks with date created.
Transcludes task in the daily note. Adds task tag. Date is ommited.

Cmd+Shift+R (block referencing helper)

I use this when I’m already looking at the block I wish to reference, bypassing the need to go elsewhere and rely on Obsidian’s autocomplete.

  1. Place the cursor at the end of the block you wish to reference
  2. Use the shortcut. A reference code is added at the cursor position.
  3. When the success notification appears, the referencing code is ready to be pasted.

This generates a link, but you can easily turn it into a transclusion by adding “!” before “[[”.

clip (no arguments)

  1. Takes the web page open in Safari’s active tab and saves it as a new note in markdown format.
  2. Places a link to it in the daily note.

Logged Google Search

Add it in Features -> Setup fallback results -> + -> Workflow Trigger
Logs every Google search you perform in Alfred, under the configured searches_heading in the daily note.


Feedback

This hasn’t been tested in any other computer. If anything goes wrong, please tell me so I can fix it. Also, if you have ideas or requests, do let me know.

Cheers!

28 Likes

You have built basically every idea I have in my running task note in Obsidian, called “Alfred and Obsidian”. This is awesome, thank you so much for sharing! :open_hands:

2 Likes

Ahah awesome. Cheers!

1 Like

this is much more fleshed out than the one i made :sweat_smile:

2 Likes

This is great!

Will install tomorrow and let you know if there are any problems…

1 Like

Well, it’s been almost a six-month project :sweat_smile:. Hope it’s useful to others.

2 Likes

adore the daily note appending features, using them constantly now, the updated while being in preview mode is nice so i don’t have to switch modes :100:

Heya,

Any chance you’d wanna trope this up on GitHub? I’d love to contribute to the workflow (:

1 Like

Sure thing! It’ll be up tomorrow. I’ll let you know. Thanks!

2 Likes

Here it is:

Thank you very much for you interest. I look forward to seeing what you come up with :smiley:

Cheers!

3 Likes

gave this workflow some love in a recent video:

7 Likes

You sure did, my friend! Thank you very much! I was so proud that I showed the video to my wife and kids :sweat_smile:

A quick note on the “Logged Google Search” feature:

The idea is to add it as a custom fallback search in the Alfred preferences. When set up, it will append everything you search to the daily note, under the specified H2 heading.

I use it as a way of effortlessly logging tiny things that catch my interest and/or retrace my steps in a rabbithole.

I also keep a regular, non-logged Google search handy, because of course there are searches that I know won’t be of interest after that one occasion.

Again, thank you! It’s great to see these things being used and appreciated. It really made my day.

Cheers!

6 Likes

Brilliant!

1 Like

This is terrific. I noticed some documentation that mentioned configuring environment variables, and then skipped right past that.

Any chance you have documentation about these configuration details?

1 Like

You can see that text again by clicking the [ x ] icon in the top right of your Alfred window when you have the workflow open, and it’s also on the github page: https://github.com/macedotavares/obsidian-utilities

Awesome, thank you!

Update: Apologies, @mrpatto I can’t work out how to set the environmental variables in the workflow. I see the instructions. Please would you point me in the right direction.

Ah, I think I found how to do this. I need to click on the Value field to add the variables:

3 Likes

First of all, many thanks for creating this workflow and sharing it. I’m a bit of a newbie to this sort of thing but I was able to work out how to edit the workflow so it can find my daily page as I like to have the day name in the title. However, when I run either the j or n command I get an Obsidian message saying its opened the daily note, it focuses Obsidian but it doesn’t append the text to the note.

Can anyone point me in the right direction to fix this? Thanks in advance.

1 Like

I figured it out. Using debugging mode in Alfred I could see that the vault path wasn’t correct.

1 Like

Fantastic workflow. Thank you.

clip alone makes it all worthwhile!

1 Like