Bookends <-> Obsidian Alfred workflow

I created an Alfred workflow for myself that connects Obsidian and Bookends, but I thought I’d clean it up and share it. The workflow and instructions can be found here.

Features:

  1. Creates a note in Obsidian for the selected Bookends reference with the following properties:
    • File name: the cite key in Bookends (you have to have BiBTeX enabled, if the citekey field is empty it just throws an error in a notification).
    • File contents include the title, authors, year, tags, URL and Bookends URL.
  2. Puts an obsidian:// link in the Bookends notes field, connecting the two.
  3. If the reference already has a file in Obsidian, it just opens it (as long as you don’t change the filename/citekey).

This is a very simplistic workflow but it was ultimately written for my own usage and I’m currently happy with it. But I can think of some improvements that I might implement if I have the time:

  1. Check the reference type (book, journal, etc) and change the fields used in the note to suit that.
  2. Somehow make use of the YAML frontmatter, maybe for better dataview indexing of these literature notes. But I don’t really use the frontmatter personally.
  3. Add more flexibility to the fields included in the note.

Let me know if you have any thoughts!

8 Likes

This is nice. I’ve got something similar in use via Keyboard Maestro, which imports a Markdown link? I wonder if you might be able to include the imported notes as well? I do wish that the built in Bookends quick cite - which is brought up by the useful double tap on the control - was more flexible.

Done, thank you for the suggestion. Check out v0.0.2 in the GitHub repository.

Example:

1 Like

Super! Will check out

Hi, your Bookends <> Obsidian workflow is great. I wonder if the file already exists you could have it ‘update’ rather than just open the existing file. The reason for this would be that if you’ve added additional notes to an entry in Bookends, you’d like this to get updated into Obsidian. I suppose the workflow might be more like 'if the file exists, delete the file and create a ‘new’ version.

Hi Oash your workflow is super!!! Unfortunately on my MacBook Pro I get an error that i don’t get while working on mi Mac Mini at work. Could you help me?
Here’s the debug lo from Alfred:

[09:14:34.097] Logging Started...
[09:15:24.037] Bookends <-> Obsidian[Keyword] Processing complete
[09:15:24.043] Bookends <-> Obsidian[Keyword] Passing output '' to Run Script
[09:15:24.475] ERROR: Bookends <-> Obsidian[Run Script] 32, integer
%20
64, integer
%40
47, integer
%2F
/Users/xxxxxxx/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/17EB5CC7-8630-47D1-A093-FBDC46381B4C:2613:2663: execution error: touch: /Users/xxxxxxxx/Library/Mobile Documents/iCloud~md~obsidian/Documents/Libreria Obsidian/@Inbox/Kermode1967.md: No such file or directory (1)
[09:15:24.476] Bookends <-> Obsidian[Run Script] Processing complete
[09:15:24.477] Bookends <-> Obsidian[Run Script] Passing output '' to Transform
[09:15:24.478] Bookends <-> Obsidian[Transform] Processing complete
[09:15:24.478] Bookends <-> Obsidian[Transform] Passing output '' to Conditional
[09:15:24.479] Bookends <-> Obsidian[Conditional] Processing complete
[09:15:24.480] Bookends <-> Obsidian[Conditional] Passing output '' to Delay
[09:15:26.663] Bookends <-> Obsidian[Delay] Processing complete
[09:15:26.665] Bookends <-> Obsidian[Delay] Passing output '' to Open URL

And here is the applescript log if I run the script separately:

tell current application
	do shell script "touch '//Kermode1967.md'"
		--> error "touch: //Kermode1967.md: Read-only file system" number 1
Risultato:
error "touch: //Kermode1967.md: Read-only file system" number 1

Could you help me? Thanks :roll_eyes: