Jump to content

ZotHero — Generate Zotero citations in Alfred

Recommended Posts




Rapidly search your Zotero database and copy citations.



  • Perform full-text search across your Zotero database, including only searching specific fields
  • Copy citations using any CSL style you have installed in Zotero
  • Copy citations either in citation/note style or bibliography style
  • Copy citations in any locale supported by CSL
  • Citations are copied in multiple formats, so the right data are automatically pasted into the application you're using
  • Trigger search while you type using the Snippet Trigger (you must assign the snippet keyword yourself in Alfred Preferences)

Download & installation

Download the ZotHero-XYZ.alfredworkflow file from GitHub releases, and double-click the downloaded file to install.

Basic usage

These are the workflow's default keywords:

  • zot <query> — Search your Zotero database (common fields).
  • zot:[<query>] — Search a specific field.
  • zotconf [<query>] — View and edit workflow configuration.

See the README on GitHub for full instructions.

Pasting citations

When you copy a citation, ZotHero puts both HTML and rich text (RTF) representations on the pasteboard. That way, when you paste a citation into an application like Word, the formatted text will be pasted, but when you paste into a text/Markdown document, the HTML will be pasted.

Licence & thanks

The workflow is released under the MIT licence.

The Zorro icon was created by Dan Lowenstein.

Citations are generated by citeproc-js (AGPLv3).

Workflow stuff is taken care of by Alfred-Workflow (also MIT licence).

Link to comment
  • 2 weeks later...
  • 6 months later...

Hi Deanishe


This is awesome! Thank you so much for all the work you've done on this Worklfow. I was hoping you could help me with one thing. I looked over the readme and GitHub to try and answer my question, but is there a way to insert the citation in a way that Zotero can read? This would be helpful in terms of generating bibliographies based on existing citations in the papers. No worries if this is not an option (I'm not even sure if it's possible).

Link to comment

I'm sorry, I don't really understand the question. I have literally never used Zotero because I haven't cited anything in 20 years.


I only built this workflow because the existing one was such a mess that nobody could understand it. I'm still waiting for someone else who knows and cares about citing stuff to take over development.


If you want me to do anything with the workflow, you're going to have to spell it out in very simple terms that someone who doesn't use Zotero and doesn't understand citations (i.e. me) can understand.

Link to comment

It's great that you took the time to work on this considering you're not using it! If I knew how to code I might give it a try, but it's beyond my abilities and what I have time to learn (at least for now). Out of curiosity, how much coding does this require?


Given that you did this more or less for fun, I think tackling this may be more of a hassle than it's worth. Let's see if I can explain the request in a bit more detail. When you install Zotero,  it installs a plugin in Microsoft Word that you can use to insert citations. The citations inserted by Zotero have embedded code. The "add bibliography" button gets Zotero to "read" all the citations throughout the text to automatically generate a full bibliography. The nice thing about this is that you can delete or add new citations in your text to modify your bibliography to reflect your changes.


The Alfred workflow inserts the unformatted text into the document. This text cannot be read by the zotero plugins. Your plugin is much faster than Zotero's own word plugin at searching. I just returned to using Zotero, so I may be wrong, but I think I used to be able to insert unformatted references and then you could have zotero process the citations in whichever citation style I wanted. I can't seem to find an option for that. For example, in Papers (another similar piece of software) I can choose to insert unformatted software (for example {Ruvalcaba:2015hk} )and then reformat the document to APA style. I found this link of someone explaining unformatted citations better than I https://forums.zotero.org/discussion/4772/unformatted-entry-a-la-endnote






Link to comment
11 hours ago, psicologo said:

Out of curiosity, how much coding does this require?


What do you mean? The whole workflow or just the feature you're asking about?


11 hours ago, psicologo said:

The Alfred workflow inserts the unformatted text into the document


It should insert correctly formatted text appropriate to the CSL style you're using.


11 hours ago, psicologo said:

The citations inserted by Zotero have embedded code


The workflow may also be able to insert the codes, but I'd need a proper description of what these codes consist of.


Link to comment
  • 3 months later...
15 hours ago, deanishe said:

Please post such comments somewhere more appropriate.

Thank you for pointing it to me, I'm new. But I have no idea where to put it otherwise. There is no general Zotero-related thread. Should I create a new separate thread for this zotero-better-bibtex-alfred workflow?

Link to comment
  • 2 months later...
34 minutes ago, Nick96 said:

Is it possible to have a quick cite copy and use the style set in Zotero? I only have access to citation styles and not export formats.


I have no idea what that means.


I don't use Zotero and never have. If you want me to add some feature, you're going to have to explain it very clearly.

Edited by deanishe
Link to comment
  • 4 months later...
Just now, deanishe said:

Scannable Cite

Thanks for quick reply! I'll explain. 

There's a zotero plugin called ODF/RTF scan. It generates Scannable Cite keys for the references in the Zotero library in this format : { | Allwood, et al., 1977 | | |zu:2513167:2MW7WLNQ}. Those keys can be inserted into any text document, which is then exported to LibreOffice format. Then ODF/RTF scan literally scans the document for those keys and convert them to proper in-text citations. 


It sounds a bit complicated, but for people writing long work in programs such as Scrivener this is almost the standard workflow. 


The cool thing is that if we're able to insert the citekeys directly with ZotHero, the whole writing experience is much faster. ZotHero has the potential. There's an Apple Script called 'zotpick' that does the job, but I think ZotHero would be better since Alfred is so powerful. 

Link to comment
1 hour ago, WayJ_M said:

There's a zotero plugin


That's a no-go, then, unless the plugin keeps its data in the Zotero database, because that's what the workflow reads. Currently, all citations are formatted using CSL stylesheets, too. If you can use a "scannable cite" CSL style, that's what you should do.



Link to comment
  • 2 months later...
On 7/8/2018 at 1:45 PM, deanishe said:

When you copy a citation, ZotHero puts both HTML and rich text (RTF) representations on the pasteboard. That way, when you paste a citation into an application like Word, the formatted text will be pasted, but when you paste into a text/Markdown document, the HTML will be pasted.


Pasting citations is super handy and one of the things I use most. For some applications I have problems that HTML formatting code is included (like “<i>journal name</i>”) when I would like just plain text (“journal name”), e.g. when pasting a citation into a plain text file in Visual Studio Code. Maybe this is by design, but often only plain text is desired without formatting. Is there a way that plain text could be enforced by the user? 

Edited by cands
Link to comment
1 hour ago, cands said:

Maybe this is by design


Yes. As it says in the text you quoted, the plaintext version is intended for Markdown documents (or HTML source code).


1 hour ago, cands said:

Is there a way that plain text could be enforced by the user?


No. It's doable, but that option doesn't exist.


If you have Keyboard Maestro, this Paste as Plain Text macro should give you the desired result:




Your clipboard history app's "paste as plaintext" feature might also work, depending on semantics. It doesn't work with Alfred's "paste as plaintext" feature, as Alfred recognises that there's already a plaintext version on the clipboard (the HTML) and pastes that.

Link to comment
  • 2 months later...
3 hours ago, MichaelL said:

if I past citations with two Authors it appears as (Fraser &#38; Jaeggi, 2020) instead of (Fraser & Jaeggi, 2020). Do I miss sth?


Which application are you pasting to? &38; is a valid HTML encoding of &. It seems likely that the HTML support of the app you're using is buggy.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...