Citing in Obsidian using Zotero

Hi. I’m trying to cite my articles in Obsidian that are saved in Zotero.
Mac user.

I press control p to bring Zotereo Intergration: Create Literature note but the following error message appears.

I’m not very tech literature, so please explain clearly. Thanks so much everyone :slight_smile:

Can you share your template?

Hi. thanks for replying Feralflora.

Is this what you mean? My colleague set this up for me.

category: literaturenote

tags: {% if allTags %}{{allTags}}{% endif %}

citekey: {{citekey}}

status: unread

dateread:


[!Cite]

{{bibliography}}

[!Synth]

Contribution::

Related:: {% for relation in relations | selectattr(“citekey”) %} [[@{{relation.citekey}}]]{% if not loop.last %}, {% endif%} {% endfor %}

[!md]

{% for type, creators in creators | groupby(“creatorType”) -%}

{%- for creator in creators -%}

{{“First” if loop.first}}{{type | capitalize}}::

{%- if creator.name %} {{creator.name}}

{%- else %} {{creator.lastName}}, {{creator.firstName}}

{%- endif %}

{% endfor %}~

{%- endfor %}

Title:: {{title}}

Year:: {{date | format(“YYYY”)}}

Citekey:: {{citekey}} {%- if itemType %}

itemType:: {{itemType}}{%- endif %}{%- if itemType == “journalArticle” %}

Journal:: {{publicationTitle}} {%- endif %}{%- if volume %}

Volume:: {{volume}} {%- endif %}{%- if issue %}

Issue:: {{issue}} {%- endif %}{%- if itemType == “bookSection” %}

Book:: {{publicationTitle}} {%- endif %}{%- if publisher %}

Publisher:: {{publisher}} {%- endif %}{%- if place %}

Location:: {{place}} {%- endif %}{%- if pages %}

Pages:: {{pages}} {%- endif %}{%- if DOI %}

DOI:: {{DOI}} {%- endif %}{%- if ISBN %}

ISBN:: {{ISBN}} {%- endif %}

[!LINK]

{%- for attachment in attachments | filterby(“path”, “endswith”, “.pdf”) %}

[{{attachment.title}}](file://{{attachment.path | replace(" ", “%20”)}}) {%- endfor -%}.

[!Abstract]

{%- if abstractNote %}

{{abstractNote}}

{%- endif -%}.

Notes

{%- if markdownNotes %}

{{markdownNotes}}{%- endif -%}.

Annotations

{%- macro calloutHeader(type, color) -%}

{%- if ty—

category: literaturenote

tags: {% if allTags %}{{allTags}}{% endif %}

citekey: {{citekey}}

status: unread

dateread:


[!Cite]

{{bibliography}}

[!Synth]

Contribution::

Related:: {% for relation in relations | selectattr(“citekey”) %} [[@{{relation.citekey}}]]{% if not loop.last %}, {% endif%} {% endfor %}

[!md]

{% for type, creators in creators | groupby(“creatorType”) -%}

{%- for creator in creators -%}

{{“First” if loop.first}}{{type | capitalize}}::

{%- if creator.name %} {{creator.name}}

{%- else %} {{creator.lastName}}, {{creator.firstName}}

{%- endif %}

{% endfor %}~

{%- endfor %}

Title:: {{title}}

Year:: {{date | format(“YYYY”)}}

Citekey:: {{citekey}} {%- if itemType %}

itemType:: {{itemType}}{%- endif %}{%- if itemType == “journalArticle” %}

Journal:: {{publicationTitle}} {%- endif %}{%- if volume %}

Volume:: {{volume}} {%- endif %}{%- if issue %}

Issue:: {{issue}} {%- endif %}{%- if itemType == “bookSection” %}

Book:: {{publicationTitle}} {%- endif %}{%- if publisher %}

Publisher:: {{publisher}} {%- endif %}{%- if place %}

Location:: {{place}} {%- endif %}{%- if pages %}

Pages:: {{pages}} {%- endif %}{%- if DOI %}

DOI:: {{DOI}} {%- endif %}{%- if ISBN %}

ISBN:: {{ISBN}} {%- endif %}

[!LINK]

{%- for attachment in attachments | filterby(“path”, “endswith”, “.pdf”) %}

[{{attachment.title}}](file://{{attachment.path | replace(" ", “%20”)}}) {%- endfor -%}.

[!Abstract]

{%- if abstractNote %}

{{abstractNote}}

{%- endif -%}.

Notes

{%- if markdownNotes %}

{{markdownNotes}}{%- endif -%}.

Annotations

{%- macro calloutHeader(type, color) -%}

{%- if type == “highlight” -%}

Quote

{%- endif -%}

{%- if type == “text” -%}

Note

{%- endif -%}

{%- endmacro -%}

{% persist “annotations” %}

{% set newAnnotations = annotations | filterby(“date”, “dateafter”, lastImportDate) %}

{% if newAnnotations.length > 0 %}

Imported: {{importDate | format(“YYYY-MM-DD h:mm a”)}}

{% for a in newAnnotations %}

{{calloutHeader(a.type, a.color)}}

{{a.annotatedText}}

{% endfor %}

{%

Yes, thanks, but please add triple backticks (```) before and after the template code so that it will be formatted correctly. It’s not very readable as-is.