I can't stress this enough. Bad things can happen when you manipulate files with poorly tested scripts. I've messed up my own vault many times while testing these actions. Dropbox's history and Git were my friends; they should be yours too. |
This is an Alfred workflow containing various actions that help you interact with Obsidian.
- macOS 10.15 (Catalina) or above
- Python3 installation in default location (
/usr/bin/python3
)
- Download this file.
- Open it.
You must configure the following environment variables before using the workflow:
The name of the folder where you keep your daily notes (eg. "Dailies").
The tag that will be appended to your journal entries. Without the octothorpe. (eg. "journal")
The H2 heading that will be created/appended to inside your daily notes. Without the octothorpe. (eg. "Google Searches")
The tag that will be appended to your task entries. Without the octothorpe. (eg. "task")
The filename of the note where you will store your tasks. Without the .md extension. (eg. "Tasks")
Placeholder for the Clip action. Leave empty.
Placeholder for the Clip action. Leave empty.
The H2 heading inside your tasks file that tasks will be appended to. Without the octothorpe. (eg. "To-Do").
This allows you to have other headings for differente task groups, like "Done" or "Archived". You can, for example, embed only your current tasks in your daily notes. ![[Tasks#To-Do]]
The name of your vault (obsidian's root folder name). (eg. "Notes")
The path to your vault.
Examples:
- "/Users/yourname/Dropbox/Notes"
- "~/Dropbox/Notes"
- "/Volumes/NAS/Notes
You must also configure the snippet object in the Related Notes action. Choose a prefix character and a keyword (e.g. /related
).
This action goes through all your notes and returns a list of titles, headings and/or blocks that fuzzy match the terms you entered, allowing you to immediatelly link to them.
Each kind of result will have a different icon:
[[]]
for note titles#
for headings^
for blocks/lines
Insert the link by pressing Enter or double-clicking the result.
Cmd+Enter will open the note file in VS Code. (I'm using an external text editor here because I didn't want to replace the active note, and I couldn't find a way of opening a new pane.) As usual in Alfred, pressing shift with a result highlighted will quick-look into it.
Note: The shortcut will only work when Obsidian is the active application and the focus is on an editor pane.
Open vault folder in VS Code
Search note titles and contents with Alfred. Open results in Obsidian or VS Code (Cmd modifier)
Append journal entry to daily note. Adds timestamped heading and journal tag.
Append entry to daily note.
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.
You can use this when you're already looking at the block you wish to reference, bypassing the need to go elsewhere and rely on Obsidian's autocomplete.
- Place the cursor at the end of the block you wish to reference
- Use the shortcut. A reference code is added at the cursor position.
- 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 "[[".
- Takes the web page open in Safari's active tab and saves it as a new note in markdown format.
- Places a link to it in the daily note.
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.
I'll fix things occasionally, in small batches. New features usually take longer. Check the Github repository for updates and source code.
Found a bug? Want to make a suggestion? Open an issue or PM me in the Obsidian forum.