Zotero integration - how to

Hello, I have a template in Obsidian for Zotero-Obsidian integration. I want the template to update the annotations as I highlight in Zotero (I’m not fussy about it being completely automatic as long as it works). The only thing is that I have sections (e.g., methods, notes) that i add information into as i go. How can i update just the annotations when I create the literature note?

Thank you so much!
Below is my code that I have adapted from sources I found online:


category: literaturenote
tags: {% if allTags %}{{allTags}}{% endif %}
citekey: {{citekey}}
status: unread
dateread:
relevance:
theme:
section:
type:

[!Info]
Title:: {{title}}

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

Author:: {% if creators and creators | length > 0 %} {% for c in creators %} {{ c.firstName }} {{ c.lastName }}{% if not loop.last %}, {% endif %} {% endfor %} {% elif creatorSummary %} {{ creatorSummary }} {% else %} — {% endif %}

Cite:: {{bibliography}}

Link:: {%- for attachment in attachments | filterby(“path”, “endswith”, “.pdf”) %}
[{{attachment.title}}](file://{{attachment.path | replace(" ", “%20”)}}) {%- endfor -%}.


[!Abstract]
{%- if abstractNote %}
{{abstractNote}}
{%- endif -%}.


[!Synth]
Contribution::

Related::

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


[!Research Structure]
Aims::

Methodology::

Framework::

Findings::

Limitations::

Location::

Comments::


[!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 %}
{% 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 %}
{% endif %}
{% endpersist %}

This has been asked before.
Look up the forum with key words for search such as ‘update’, ‘Zotero’, ‘annotations’.
I have one, instantly:

Thank you, but this does not really work with annotations.

How so? Can you clarify?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.