Alfred - Obsidian Utilities

Hi Yaaqoub,

Did you set up the external_editor environment variable to something like ~/Applications/Visual Studio Code.app?

It has to be a valid path to a text editor capable of handling directories.

If this is set up correctly but the action still doesn’t work, please enable Alfred’s debugging mode, run v again and DM me the logs.

Cheers!

Did you ever get this sorted? I opened an issue in the GitHub just now, but you may already hold the answer.

I’m back from the future to provide my younger self with the answer. Alfred has a slightly different date format, or it’s less forgiving than obsidian. You will need to edit the date value for each action in the workflow.

CleanShot-CleanShot-17022022-0923

It is clunky with tasks because the task’s action specifies the date and links it to your daily note, and your daily note path is janky af.

Vault - Obsidian v0 13 23-Obsidian-17022022-0924

If you spend some time looking at the workflow, you should make changes that make it work the way you prefer.

@macedotavares Thanks a bunch for this. Made my workflow so much better. One question though, I generally like the file format for my daily notes to be MM-DD-YYYY, but noticed that {var:date} variable always produces the format YYYY-MM-DD.

Is there a way to change this?

I am facing the same problem. Did you solve the problem?

I came across this yesterday after watching the YouTube video of this Alfred workflow from Bryan Jenks.

@sudoleone, @Rifat

You will need to change the date variable in the workflow from {date:yyyy-MM-dd} to {date:MM-dd-yyyy}.

Do this by double clicking on this workflow object:
image

You will need to change it for each workflow that uses the date variable.

The filename of my daily notes is in the yyyy-mm-dd format so I did not test it. But I have verified the format did change using the workflow debug utility.

HTH.

I am having issues with the setup, think it may be the fact my vault is in icloud. Anyone get their icloud setup to work?

[12:49:44.000] ERROR: Obsidian Utilities[Write Text File] Unable to write file ‘blah blah blah /Daily Notes/2022-12-29.md’ as parent folder does not exist

Go to System Preferences → Apple ID (at the top right) → iCloud (tab on the left) → Try to uncheck “Optimize Mac Storage”.

This might force your files to stay downloaded locally. (It should, but I don’t really know if iCloud respects the setting.) If it’s checked, it may be offloading to the cloud, and appearing missing to Alfred/Obsidian.

Now I get a new error
07:31:34.225] ERROR: Obsidian Utilities

i love this workflow/utility - esp the dj (j) add journey entry option – i altered the input to display how i want it to… but… the only thing i’m noticing and cant’ seem to resolve is where the cursor picks up after the entry – it seems that the cursor lands above the entry, i’d like it to land below the entry so i can continue on with my thoughts… any ideas guys? anyone else encountered and solutioned for this? img below

image

You need to edit the Obsidian Utilities workflow in Alfred:

Double click on the higlighted object (the one with ‘append to file’)…

Edit what’s in the black dialogue box. I can’t remember what the original was. You need to experiment with it to get it right. I think to have the cursor below what you have entered using dj ...., place the cursor on the following line after {query}.

This is a great workflow utiltiy as you can dj... even when Obsidian is not running as it modifies the markdown file directly. This is provided you have set up the right paths and naming convention.

Hope this helps.