I am trying to create a Hazel rule that will import journal article PDFs into Zotero (since sometimes the Zotero web connector will not grab PDFs and I have to manually import them). I’ve set up conditions so that a PDF will only be imported if it contains strings like “bibliography” or “university press”, but I have not yet figured out how to actually import the file into Zotero.
In Zotero, there are three main ways to manually import a PDF:
- Use the “Add File…” option under “New Attachment” in the Zotero menu bar
- Drag and drop the PDF into the reference pane of your library in Zotero
- Drag and drop the PDF onto the Zotero icon in the dock
Is there a way to have Hazel do one of these actions? Ideally it would run in the background (i.e., without having the Zotero window move to the front of my screen) and it would mark the PDF as processed in some way after.
1 Like
Welcome! Having Hazel run something like this AppleScript should do it. This should be the same as dropping the PDF on the dock icon. Hazel is repeatedly crashing when I try to build this, so it’s probably not quite right. tell application "Zotero" to open theFile
1 Like
These two Zotero plugins may be helpful too … I think at least one of them has an ability to watch a folder for new PDFs and add them to Zotero:
If you are using an older version of Zotero, then this now-deprecated plugin may be what you need:
http://zotfile.com/
I think these plugins are more useful for linked files rather than stored files.
1 Like
@hesperusphosphorus – Does this option really work for you? It does not work for me. Dragging a PDF onto the Zotero icon does nothing. If I force a PDF to open with Zotero, I get an error message saying “the selected file is not in a supported format” and a link to this website which tells me that only bibliographic format files can be opened by Zotero. I’m using the new Zotero (version 7).
Because “open with” does not work for me, the Hazel options are ineffective. Have you figured out a way to do what you were looking to do?
Drag and drop works for me if I drag it to the library, not the Dock icon.
Plugins are a better way to deal with this ATM.
1 Like