Obsidian is really cool and free note-taking app that wants to be your second brain. To learn more about it, check out my Obsidian overview and how I use it to take notes (and why we take notes).
This simple Alfred workflow uses Obsidian's URI scheme and JXA actions/scripts (thanks to @hjklapp) to open notes in their vaults. This workflow has been tested in Obsidian 0.12.5. See also known issues.
For changelog, see release notes.
Available Alfred features/keywords (contributors in parentheses)
ov
,oo
(@hjklapp)os
, or
, ot
oss
, orr
, ott
on
od
(@technicalpickles, @luckman212)
otmr
oi
(@LouisInFlow)
oii
or customize your Hotkey to open inbox note.onotify
odi
od
command first (once per day) before using odi
.oterm
o?
Download the latest release and add the workflow to Alfred. Only tested in Alfred 4.
ov
To open one of your many Obsidian vaults, type ov your_vault_name
. If you vault name is my notes
, you type ov my notes
. You can change the keyword input subtext to remind yourself of the names of your vaults. Double-click ov Keyword to change the Subtext field.
All other features require a one-time set-up (v0.2.0 onward).
This version (≥ v0.2.0) of the workflow requires a one-time set-up.
oaddvault
oclearvaults
oclearvault
If you use Obsidian's Daily notes plugin, you'll also need to set it up.
odailyvault
odailyformat
1990-3-1
, enter yyyy-m-d
900301
, enter yymmdd
1_3-90
, enter d_m-yy
1 March 1990
, enter d MMMM yyyy
Mar 01, 90
, enter MM dd, yy
2021-05-15-Fri
, enter yyyy-mm-dd-ddd
odailypath
odailytemplate
After setting up the daily notes commands, you can also append text to your daily note with odi the text you want to append
. odi
works like oi
, but appends to your daily note instead of your inbox note (see below).
If you want to append text to an inbox note, you'll have to specify the note you're using as your inbox note.
oinbox
oinboxtime
oo
oo your_vault_name
od
od
opens today's daily note. Alternatively, you can use a hotkey. If you've successfully followed all the set-up steps, od
will also create today's daily note if it doesn't exist yet. If you see error messages, most likely you haven't set things up properly. Follow the set-up instructions carefully and try again.odi
lets you append text to the end of your daily note. Before you use odi
each day, you have to first use the command od
(or the corresponding keyboard shortcut which you might have set up). You only have to perform this step once a day so Alfred knows the path to your daily note; otherwise, odi
might append the text to your previous day's daily note.
otmr
Works the same way as od
, but for tomorrow's daily note. Great for planning your next day.
os
, or
, ot
(or oss
, orr
, ott
)The keywords os
, or
, and ot
will look for markdown files everywhere on your system (i.e., not just your vaults). If a file isn't in any of your Obsidian vaults, the file will open in your default editor instead of Obsidian.
xyz
: os xyz
xyz
: or xyz
xyz
: ot xyz
To look for markdown files that are only inside your vaults, use oss
, orr
, and ott
instead. These three keywords require you to first press enter before you can perform your search. You can also customize your hotekeys to perform these searches.
Common problem: No matching file found (see issue #15). If this problem happens to you, try the solutions described here.
on
on
will ask you to select a vault. Then you'll enter the note name/title. The new note will open in the selected Obsidian vault.20201121_151123
, which is generated using Alfred's dynamic placeholders: {date:yyyyMMdd_HHmmss}
. oi
lets you append text to an end of a note. To use oi
, you first have to specify which note you want to append to using oinbox
. Then, oi Hello world!
will append - Hello world!
to the end of your inbox note.
In addition, you can set up hotkey (see image below) to directly append the contents in your clipboard to the end of your inbox notes.
BECAUSE THIS FEATURE MODIFIES YOUR NOTES, BACK UP YOUR VAULT AND NOTES!
Timestamps can also be included when adding text (#27). Use oinboxtime
to specify whether to prepend or append timestamp. You can also manually configure the format of the timestamp (see screenshot below).
To open your inbox note in Obsidian, use oii
or customize your hotkey.
Supports Alfred fallback searches (i.e., "Fallback searches are the list of search options you see when you search for a keyword that doesn't match a result on your local Mac."; see screenshot below). Thanks @technicalpickles for suggesting this feature.
When a fallback search is invoked, the workflow will ask which vault you want to search in. To set it up, follow these steps:
If the Obsidian app isn't already opened, this workflow will always open the last recently opened vault. This bug is a known issue with Electron apps on MacOS. See discussion on Obsidian's Discord. To overcome this limitation (see #23), many commands in this workflow (v0.3.0 onward) try to open a note twice (the second attempt happens 3 seconds after the first attempt), so you'll see two Obsidian notifications.
If your vault is located in your iCloud drive, make sure to add iCloud drive's path to Alfred's default search scope (Features -> Default Results -> Search Scope). #30
If you run into issues configuring this workflow, you can try to manually specify the workflow's environment variables. Navigate to the workflow in Alfred and click the button highlighted below. You should see a list of name-value pairs. For example, dailyvault
is the name of the variable that keeps track of the value of the path to the vault that contains your daily note. dailyformat
stores the format of your daily note (e.g., yyyy-mm-dd
).
Alphabetical order