Zotero Better Notes plugin (syncs notes with Obsidian)

I’ve recently started using the Zotero plugin Better Notes, which does something pretty great: it provides a two-way sync between Zotero sidebar notes/annotations and Obsidian notes. I had posted about it in response to a question in another thread, and some were interested in it, so I thought I’d share my experience–especially because its documentation is a bit hard to understand, and there’s not been any significant discussion of it on these forums that I could find. However, there are a ton of caveats here, because I’m not connected to the developer in any way and I haven’t used the plugin for long at all: I can’t really answer many questions about it; and I may well not be describing the best/most efficient ways of using the plugin. If someone who better understands the plugin wants to take over a discussion here, be my guest!

What does the plugin do?

It does one thing that I find extremely helpful (1 below) and another thing that has the potential to be extremely helpful (2 below). It also has a “workspaces” notes function, which I think allows you to connect notes within Zotero, but I couldn’t see how to make it useful (for me).

  1. Two-way syncing

Better Notes allows you to sync sidebar notes in Zotero (the ones you add, within the internal PDF reader, to the righthand panel using the “+” sign) with another, markdown note in Obsidian. It’s a two-way sync: anything you write/edit in the sidebar note you will also see in the Obsidian note (after a slight lag) and anything you write/edit in the Obsidian note you will also see in the sidebar (again, post lag). To be crystal clear, what you’re syncing here are Zotero’s sidebar notes and NOT the little comment-box notes that you can add directly onto the PDF by clicking. (However, I believe that some templates may allow you to pull those comment-boxes into the sidebar note, so they can be synced, too.)

All you need to do to set up the sync is to create a sidebar note in the Zotero PDF reader, as you normally would, then select the option (which will come available when you add the plugin–see below) to export the note. Once the note is created in Obsidian, it’s synced with the sidebar note forever (unless you deliberately unsync it–see below).

The two-way sync to Obsidian is very useful if, like me, you like to browse through literature in Zotero and take reading notes in the Zotero PDF reader but prefer to use Obsidian for linking/processing reading notes (e.g., with hyperlinks) and writing. This way you can go back and forth between these two functions, and edit the notes wherever, and not worry that anything is out of date.

  1. Templates

Better Notes also allows you to create templates for your notes (e.g., header structures that you use repeatedly or scripts to pull blocks of text or images from the PDF into the note). These can be inserted at your cursor or when you create a note in the first place (see below). There are maybe two dozen such templates posted online under the plugin’s Github discussion. Many of these templates seem, based on discussions I’ve seen and my own trials, to break fairly quickly, though, and have to be updated, because the plugin is under active development. So not sure how useful this is unless you’re really great at writing templates yourself (I haven’t found any templates that work that I really like).**

But there’s a lot of potential here! For instance, a template that exists but is currently broken is one that collects highlighted text from the PDF only of a certain color; I wouldn’t mind dumping those directly into my synced note.

How do you set up and use the plugin?

To get the plugin up and running as described above, I just had to install it on Zotero (NOT Obsidian) using the ordinary process (download .xpi file from the Github site linked above, install under Zotero’s Tools>Addons menu) and that’s basically it. There’s zero setup/configuration. The one thing I might recommend changing is the default template that creates the name for the file in Obsidian, because it just takes the first like 12 words in your note as the title… You change the template by selecting from the Zotero menu File > Template Editor and then clicking on and editing/saving the pre-created ExportMDFileNameV2 template. I’m not great with computer languages but I can give anyone who wants it my edit, which just creates a title based on the BibTex cite key. The Template Editor is also where you can go to create new custom templates.

And the one other thing that you might need as you go is the “Sync Manager” (accessible under Zotero’s Tools menu)–that allows you to track your syncing notes (e.g., it lists last sync) and unsync if you need (I needed to do a lot of that as I was experimenting). One warning: if you try to delete a synced note on the Obsidian side, it won’t work; a new note will be created. You have to instead unsync the note first using the Sync Manager.

The actual syncing process is pretty easy. You open an article in the Zotero PDF reader, open a new sidebar note (I only ever use one, but you can sync multiple notes for one source), then click the option at the top of the right sidebar (click on the three dots in a new menu row created by Better Notes) to “Export Current Note.” A dialog window pops up: select (paraphrasing) “export each note as a standalone” (don’t fully get why, but this is the only option that works with Obsidian for me) and then select all the markdown options, including (critically) the auto-sync option. Once you hit export, you’ll be asked where you would like the synced note to be created (I select a new folder that I created in my Obsidian Vault for that purpose) and the note is created there and accessible from within Obsidian. And that note in Obsidian will be synced with the sidebar note in Zotero. If at any point there’s a conflict between the notes, you will get prompted to resolve it by a popup (which shows the different edits in each note).

Templates are for the sidebar notes. They would enter into this process either when you create a sidebar note within Zotero PDF reader (you’ll get the option to open a new note, open a new note from annotations, or open a new note from a template) or while you’re writing in that note (you can, going back to the three dots in the Better Notes menu bar in the right sidebar, select to Insert a Template where your cursor is). This could allow you to automatically insert certain standard info into the sidebar note (like metadata and highlighted text from the PDF itself) that will in turn show up in the Obsidian linked note. But again, I didn’t have the best success making these work.

11 Likes

Sorry I hate this kind of ambiguous language too. Will keep it in mind next time.

I was actually talking about the Zotero Better Notes that @macrospect mentioned. I followed your recommendation and didn’t try out AidenLX’s Obsidian Zotero plugin.

Now to the Zotero Better Notes plugin.


May I ask you @macrospect if you’re able to read Chinese? I’ve struggled quite a bit through the documentation (everything is in the GitHub page, the wiki is outdated) and it’s tough for me to put things together. The machine-translated Chinese-to-English is hard to wrap my head around. There’s also a few discussion about the plugin on the Zotero forum (example) but iirc, it’s mostly “urgh you can use the built-in browser translation to understand the docs” (which I tried and then gave up).

Regarding feature #1 — 2-way syncing between Zotero built-in notes and md files in Obsidian — admittedly it’s really cool, but there’s a lot to demand. Some cons:

  • If you’re doing simple 2 way sync it should be fine, but if you’re introducing hierarchy (think nested lists), the notes look messed up. There’s a blank line with between every item in the list. The tab character is replaced by 4 spaces.
  • The notes imported into Zotero can have the color with them too (really cool). However, it uses complex html markup for everything (even for links such as ([AAA, 2020, p. 263](zotero://select/library/items/WLZ2BHQE)) ([pdf](zotero://open-pdf/library/items/GQ225JF7?page=271&annotation=3TYA8J98)) were wrap around complex html syntax, which make your notes looks super cluttered.

But it’s really easy to set up 2-way sync and this is a separate feature than using the template, so you can just try it without the template features. Remember to choose this option (as @macrospect mentioned above) when you set up the autosync

I didn’t try the template because I didn’t understand how to get it to work, so can’t comment on that.

I just had written up a new standalone version of this post before it was transferred. So went ahead and posted that here.

Sorry for the confusion!

I don’t understand Chinese, either. But I think that this README on the latest version of the plugin’s Github site isn’t too hard to understand: GitHub - windingwind/zotero-better-notes: Everything about note management. All in Zotero.. Somehow I just had a hard time understanding it out of context when I was first reviewing whether to use the plugin.

The downsides you mention do in fact sound like problems! I don’t use any complex outlines in my notes (at most, one level of bullet points), so that may be why it’s working for me. However, I didn’t have a problem with exporting color in my notes. The export for me uses basic markdown syntax, e.g., (span style=“color: #4eb31c”)(/span) (replacing brackets with parens so they’ll show up). At the same time, I edit all of my notes in Live Preview mode, so that might mean that I’m missing other cluttering potential that’s there…

No problem! Thanks for your help.

Sorry it was me who requested help from @ CawlinTeffid to split the topic.

I agree if you just need to set up 2-way sync it’s fairly straightforward.

It was a few weeks ago that I tested this plugin so I don’t have a good memory of it now. Could also be because of my other settings in Zotero. The plugin is indeed under very active development. I’m looking forward to Zotero 7 coming out of beta to give this plugin another try.

Thanks, @macrospect, for the sharing and instructions. Could you share here with us your edit of the ExportMDFileNameV2 template? I like creating a title based on the BibTex cite key followed by note item number.

Sure! You can find the template at this link, within the template repository the Better Notes creator made for sharing templates:

2 Likes

Does everyone agree that this is the best method for using zotero with obsidian?

Would anyone be able to share their workflow with a diagram?

Please don’t use AI-generated explanations to help here — they confidently state wrong information too often. If you don’t have the answer yourself, that’s OK — someone else might. Thanks!

3 Likes

No, I don’t think everyone does.

Yes, exactly.

We don’t ban all AI-generated content. You’re welcome to use AI to help with your prose, but please don’t use it to generate suggestions if you don’t know the answer yourself. Our experience has shown those suggestions to be wrong too often. A review process would be an unreasonable burden and distraction.

7 Likes

I completely agree that many Zotero users find that organizing and reflecting on their ideas in a Markdown editor like Obsidian can significantly enhance their thoughts. As @nhanjkl mentioned, I think it would be beneficial to replace complex HTML tags with simple links (like

[AAA, 2020, p. 263](zotero://select/library/items/WLZ2BHQE) ([pdf](zotero://open-pdf/library/items/GQ225JF7?page=271&annotation=3TYA8J98)))

to ensure a smooth Markdown editing experience.

Hi macrospect, I think your post is unique on the entire web, which explains how to use Better Notes with Obsidian. If you created a tutorial with screenshots, I believe it would be one of the most viewed tutorials in the history of YouTube…

2 Likes

Hi, I started using this and am running into a problem. I have existing notes in Obsidian. Now I create a note in Zotero and decide to export that to Obs. All is well. I then realize there is this note in Obs. that I can link to from my Zotero note, but I don’t want to use the HTML route, I want to link using the “[[” “]]” method. The linking from within Obs works. The Zot. note links through to the Obs. note. BUT. When the auto-sync kicks in, the Zot. note looks fine in Zotero, e.g. [[oral]], but the link in Obs. broke. The auto-sync changed the “[[” to [[, each of the square brackets has a backslash in front of it, which this reply does not want to render correctly.
image

I tested it now using the obsidian file link. After exporting your note from Zotero, you can link to other Obsidian notes using the file link - not the wikilink. This will sync back to Zotero during the auto-sync and you will be able to also open the Obsidian note from Zotero. Do not think you can link it this same from Zotero - that just causes a mess in your Zotero note and no link to Obsidian.

This is how it renders in Zotero when you do the linking in Obsidian:
image

Ok I see now you can link to the Obsidian note successfully from Zotero using the hyperlink button.