Zotero Import Template: How to add Language and Number of Pages to properties?

What I’m trying to do

I am trying to fit a Zotero Import Template that I got from somebody else to my needs and find myself battling with that. Specifically, I would like to have the “langid” and “pagestotal” of a given source added in the Obsidian note that is created when I import from Zotero as the new properties “language” and “pages”. Below I’ll paste my attempt (the properties from the Zotero Import Template that I’m trying to modify). The result right now is that these properties will always be “empty”, even when the “langid” and “pagestotal” of the corresponding entry in the .bib-file definitely have a value. What am I missing here?

Thanks so much in advance!

Things I have tried

My solution:


citekey: {{citekey}}
aliases: ["
{%- if creators -%}
{{creators[0].lastName}}
{%- if creators|length > 1 %} et al.{% endif -%}
{%- endif -%}
{%- if date %} ({{date | format(“YYYY”)}}){% endif -%}
{%- if shortTitle %} {{shortTitle | safe}} {%- else %} {{title | safe}} {%- endif -%}
"]
doi: “{{DOI}}”
ISBN: “{{ISBN}}”
title: “{{title}}”
authors: {{authors}}
tags: [literatureNote, {% for t in tags %}{{t.tag}}{% if not loop.last %}, {% endif %}{% endfor %}]
year: {{date | format(“YYYY”)}}
language: “{{langid}}”
pages: “{{pagetotal}}”
status:
reference_trail: open
collection: “{{collections[0].name}}”

The outcome:

Bildschirmfoto 2025-04-08 um 14.47.13

The corresponding entry in the .bib-file:

Bildschirmfoto 2025-04-08 um 14.48.11

I might add that it works perfectly fine with the “ISBN” property which I also added myself - here the corresponding value of the “ISBN” line from the .bib-file is correctly displayed if it has one, and only if it doesn’t have one it is displayed as “empty”.

Is there anything else I should add here to clarify my problem?

Okay, after some more reading I finally figured it out - will post my solution here so that people can find it in the future, should they need it.

I eventually discovered the Zotero Integration Data Explorer, which can be opened via the Command Palette. Viewing any Zotero entry there displays the information available to the import template - there I found the correct names for the properties I was looking for, which in my case are “language” (in lower case!) and “numPages”. Using those in the import template works.
My key takeaway here is that apparently the import takes its info not directly from the entry in the .bib-file, or at least not in the way it’s presented there. And, of course, that I should read more documentation before giving up from now on.

So, thanks anyways - I’ll mark this as resolved.

Zotero Integration doesn’t interface with .bib files at all. Not sure where you got that impression. It only works when Zotero is running in the background, because it fetches the data from there.

The reason why Better Bibtex is needed is because it provides an API that Zotero Integration uses to connect to Zotero, not for it’s automated bibliography exports.

Anyway, glad you found the data explorer and solved the issue.