In Zotero 8, you cannot make {{citationKey}} a file name for export. Even though it is listed here as a possible name in the FILE RENAMING Zotero page.
File renaming and export are two different features in Zotero.
{{citationKey}} is a variable available in the file renaming system. If a citation key is set for an item, and your renaming template includes {{citationKey}}, it will be correctly used when Zotero renames attached files.
Exporting is separate. When you export items, you manually choose the filename in the save dialogue - this is not connected to the file renaming template, so {{citationKey}} won’t be applied automatically there.
If this doesn’t clarify things, could you share what exactly you’re exporting and what behaviour you expected?
Thank you for your attention. I am new to this system, I've been working since October to create this workflow. I do a lot of workarounds I am sure and now the flow is broken and I don't know where the break has happened.
I tested everything again this morning. This {{citationKey}} now works in the rename file in Zotero which is fantastic. That really helps move this issue along!
That hasn't been working until today. The last issue is I cannot create a Literature note in Obsidian as I had before. I realize this isn't a zotero issue except - the system stopped working when I upgraded. I think perhaps I don't understand the difference between a file name and a better bib tex created citation?
My Zotero 7 workflow: Zotero + Better BibTex + Attanger --> Move/Link PDF file to Obsidian - PDFs live in Obsidian. The {{citationKey}} created/Pinned by BBT would become file name within Obsidian.
Work Flow Find article on web browser Use Zotero Connector Double Check information pane that {{citationKey}} was correct: last name of author_first word of title_year. In BBT this was zotero.clean. Create PDF on web browser Download PDF to Downloads File Link PDF file in zotero Use Attanger to link and move PDF to Obsidian.
THIS IS NOW WORKING - I was unable to get this far before this morning.
Now that a PDF exists in Obsidian I create a Literature Note which is where I keep the annotations and my notes about the PDF. This is the last step and it is not working.
I use a PlugIn in Obsidian called Citations. I realize perhaps this is part of the break.
I just found a fix I wanted to share if anyone is having the same issues:
The most likely cause is the Zotero 8 + Better BibTeX citation‑key migration: Zotero Integration is still “talking” to Zotero, but the plugin is no longer getting a usable citekey / format back, so the progress bar flashes and nothing is inserted.
Open Zotero Preferences → Advanced → Config Editor and verify extensions.zotero.httpServer.localAPI.enabled is true (Zotero’s local API has to be on for Obsidian to receive data).
In your Zotero library, check that items actually have a Citation Key (new Zotero-native field). If these are blank after the migration dialog, Zotero Integration may have nothing to insert.
If keys are missing (it was my case on the articles I uploaded after the new Zotero update), regenerate them. How to regenerate them:
Regenerate for specific items:
Select one or more items in your Zotero library (use Ctrl/Cmd+A for all in a collection). Right-click → Better BibTeX → Refresh (or Refresh BibTeX key). This applies your BBT citation key pattern and populates the Citation Key field in the right pane. Regenerate for entire library:
Go to Zotero → Edit → Preferences → Better BibTeX tab.
Confirm or set your Citation key pattern (default is auth.lower + shorttitle(3,3) + year; edit if needed for your academic style).
Select all items (Ctrl/Cmd+A across libraries/collections).
Right-click → Better BibTeX → Refresh. BBT will generate/pin stable keys based on authors, title, and year, avoiding clashes.
It is using the default file naming instead of the actual citation key, which would be HollandSibindiGinzburgEtAl20 for this item.
If I edit the file name (e.g., delete a leading or trailing space between {{ and citationKey) then it updates the example output, but does not work for Atanger to rename and move the attachment. And it didn't volunteer to rename any existing files after editing.
Some of the issues I encountered were fixed after I made sure everything was updated again - it seems they were rolling out updated versions by the day & the
Zotero-->Settings-->General-->customize file format--> putting {{citationKey}} in the box, yielded my better bibtex created citation key which looks like this:
author's last name_first word of title_year
or
kramer_first_2012. That seemed to be a zotero fix but I am not sure because it wasn't working for at least a day or two or three when I started. Then I did :
Open Zotero Preferences → Advanced → Config Editor and verify extensions.zotero.httpServer.localAPI.enabled is true (Zotero’s local API has to be on for Obsidian to receive data).
And that worked - so that when the PDF was linked and then moved by attanger - the PDF had the BBT citation key as the file name for the PDF and I could create corresponding literature notes that had all the bibliographic information about the PDF file.
Select one or more items in your Zotero library (use Ctrl/Cmd+A for all in a collection). Right-click → Better BibTeX → Refresh (or Refresh BibTeX key). This applies your BBT citation key pattern and populates the Citation Key field in the right pane. Regenerate for entire library:
I cannot adequately express how sorry I am for these disruptions I cause, and I understand people just need to get on with their work, but I think this is terrible advice. The keys are safe and easily remigrated. At the time this information was posted I already had fixes for these problems, and moreover, problems that do not get reported to me I cannot fix. Support for BBT happens on github, not here. My support tooling is integrated with github.
You can still get your old keys back. for the first 5 minutes after BBT startup, the Help menu has an option "Re-do key migration". Select that, make your choices, and your keys are back.
@rcoreilly the Attanger plugin author can contact me on github. My guess would be that that integration was doing direct reads on the BBT database; that is now gone. The integration can read the keys from the zotero database, but I'd recommend using the zotero local API for that, or the BBT JSON-RPC API.
@emilianoeheyns -- I'm not sure what is doing what anymore with file renaming, given that some of this functionality seems to have migrated into zotero proper, and some still is in Attanger, but anyway, I don't see how BBT is involved in any way. To be clear:
* all of the BBT citation keys are now properly stored in the new citationKey field.
* If I have Attanger disabled, and I edit the Filename Format settings in zotero preferences, it *temporarily* "works" to show the correct filename in the example below the text field per the screen shot above, but it does NOT properly rename any of the misnamed files to this citation key name. If I restart zotero, then pull up these preferences, it shows the incorrect, default filename formatting, as shown exactly in the screen shot.
So, I don't see how this is a Attanger problem: it seems to be a zotero bug.
But unless zotero happens to work properly with the Rename Files thing (and names them properly according to this setting in the first place), then it looks like I still might need Attanger to manually drive renaming of the attachments. But, in any case, with this zotero bug, it doesn't get the correct filename.
I hope this is sufficiently clear and that the zotero team somehow recognizes that this looks like their bug, and not anything to do with BBT or Attanger.
I'm experiencing the same issue as @rcoreilly. I cannot get Zotero 8 to rename any of my files to the citation key, even though it is aware that the filename format is citationKey and the citation key field has the correct value.
This happens with Attanger -> Rename and Move Attachment, but it still seems like a Zotero bug because it displays the incorrect filename in the Settings -> General -> Filename Format screen as in the screenshot from @rcoreilly, and the rename files feature in that screen does not work either.
@poettli have you restarted zotero and confirmed that it still works after the restart? I can get it to temporarily show the correct filename when changing the template, but it (a) doesn't actually rename any files that have been incorrectly named (does it rename for you?) and (b) reverts to the default upon restarting zotero.
I had BBT 8.0.31. So I installed .41, removed Attanger, and reinstalled the zotero 8.0.3 app, and I am getting identical behavior as before. So I cannot replicate @poettli good behavior. Which platform are you on? Thanks!
{{citationKey}} is a variable available in the file renaming system. If a citation key is set for an item, and your renaming template includes {{citationKey}}, it will be correctly used when Zotero renames attached files.
Exporting is separate. When you export items, you manually choose the filename in the save dialogue - this is not connected to the file renaming template, so {{citationKey}} won’t be applied automatically there.
If this doesn’t clarify things, could you share what exactly you’re exporting and what behaviour you expected?
I tested everything again this morning. This {{citationKey}} now works in the rename file in Zotero which is fantastic. That really helps move this issue along!
That hasn't been working until today. The last issue is I cannot create a Literature note in Obsidian as I had before. I realize this isn't a zotero issue except - the system stopped working when I upgraded. I think perhaps I don't understand the difference between a file name and a better bib tex created citation?
My Zotero 7 workflow: Zotero + Better BibTex + Attanger --> Move/Link PDF file to Obsidian - PDFs live in Obsidian. The {{citationKey}} created/Pinned by BBT would become file name within Obsidian.
Work Flow
Find article on web browser
Use Zotero Connector
Double Check information pane that {{citationKey}} was correct: last name of author_first word of title_year. In BBT this was zotero.clean.
Create PDF on web browser
Download PDF to Downloads File
Link PDF file in zotero
Use Attanger to link and move PDF to Obsidian.
THIS IS NOW WORKING - I was unable to get this far before this morning.
Now that a PDF exists in Obsidian I create a Literature Note which is where I keep the annotations and my notes about the PDF. This is the last step and it is not working.
I use a PlugIn in Obsidian called Citations. I realize perhaps this is part of the break.
This may be the issue:
Literature note title template @{{citekey}}
https://s3.amazonaws.com/zotero.org/images/forums/u18771329/5vjw163kv206ocnabizh.png
I am going to add a photograph.
The most likely cause is the Zotero 8 + Better BibTeX citation‑key migration: Zotero Integration is still “talking” to Zotero, but the plugin is no longer getting a usable citekey / format back, so the progress bar flashes and nothing is inserted.
To solve it (it worked for me) :
In Zotero:
Confirm Better BibTeX is enabled (Tools → Add-ons → Extensions → Better BibTeX).
Open Zotero Preferences → Advanced → Config Editor and verify extensions.zotero.httpServer.localAPI.enabled is true (Zotero’s local API has to be on for Obsidian to receive data).
In your Zotero library, check that items actually have a Citation Key (new Zotero-native field). If these are blank after the migration dialog, Zotero Integration may have nothing to insert.
If keys are missing (it was my case on the articles I uploaded after the new Zotero update), regenerate them.
How to regenerate them:
Regenerate for specific items:
Select one or more items in your Zotero library (use Ctrl/Cmd+A for all in a collection). Right-click → Better BibTeX → Refresh (or Refresh BibTeX key). This applies your BBT citation key pattern and populates the Citation Key field in the right pane.
Regenerate for entire library:
Go to Zotero → Edit → Preferences → Better BibTeX tab.
Confirm or set your Citation key pattern (default is auth.lower + shorttitle(3,3) + year; edit if needed for your academic style).
Select all items (Ctrl/Cmd+A across libraries/collections).
Right-click → Better BibTeX → Refresh. BBT will generate/pin stable keys based on authors, title, and year, avoiding clashes.
https://s3.amazonaws.com/zotero.org/images/forums/u2406800/ubu2quubomaopha6azke.png
It is using the default file naming instead of the actual citation key, which would be HollandSibindiGinzburgEtAl20 for this item.
If I edit the file name (e.g., delete a leading or trailing space between {{ and citationKey) then it updates the example output, but does not work for Atanger to rename and move the attachment. And it didn't volunteer to rename any existing files after editing.
Zotero-->Settings-->General-->customize file format--> putting {{citationKey}} in the box, yielded my better bibtex created citation key which looks like this:
author's last name_first word of title_year
or
kramer_first_2012. That seemed to be a zotero fix but I am not sure because it wasn't working for at least a day or two or three when I started. Then I did :
Open Zotero Preferences → Advanced → Config Editor and verify extensions.zotero.httpServer.localAPI.enabled is true (Zotero’s local API has to be on for Obsidian to receive data).
And that worked - so that when the PDF was linked and then moved by attanger - the PDF had the BBT citation key as the file name for the PDF and I could create corresponding literature notes that had all the bibliographic information about the PDF file.
You can still get your old keys back. for the first 5 minutes after BBT startup, the Help menu has an option "Re-do key migration". Select that, make your choices, and your keys are back.
* all of the BBT citation keys are now properly stored in the new citationKey field.
* If I have Attanger disabled, and I edit the Filename Format settings in zotero preferences, it *temporarily* "works" to show the correct filename in the example below the text field per the screen shot above, but it does NOT properly rename any of the misnamed files to this citation key name. If I restart zotero, then pull up these preferences, it shows the incorrect, default filename formatting, as shown exactly in the screen shot.
So, I don't see how this is a Attanger problem: it seems to be a zotero bug.
But unless zotero happens to work properly with the Rename Files thing (and names them properly according to this setting in the first place), then it looks like I still might need Attanger to manually drive renaming of the attachments. But, in any case, with this zotero bug, it doesn't get the correct filename.
I hope this is sufficiently clear and that the zotero team somehow recognizes that this looks like their bug, and not anything to do with BBT or Attanger.
This happens with Attanger -> Rename and Move Attachment, but it still seems like a Zotero bug because it displays the incorrect filename in the Settings -> General -> Filename Format screen as in the screenshot from @rcoreilly, and the rename files feature in that screen does not work either.
https://s3.amazonaws.com/zotero.org/images/forums/u2119014/y86rgcj34w50nrnqpo8s.png