Zotero integration not importing highlights and images

What I’m trying to do

I’m trying to import my zotereo highlights in obsidian.
It imports all th metadata that I ask for but leave the highlight portion blank

Things I have tried

I tried different templates. I followed multiple tutorials.
everything works fine except that it doesn’t import my annotations.

If you add your template you were using enclosed in a 3 backticked code fence, someone can have a look. Currently, we can look, elsewhere.

1 Like

I finally got it to pull the highlighted passages and images using the following template. But it just pulls the plain text and a reference to the page, it doesn’t preserve the highlight colors.
I do have Highlightr on.
‘’’
{% for annotation in annotations -%}
{%- if annotation.annotatedText -%}
{{annotation.annotatedText}}”{% if annotation.color %} {{annotation.colorCategory}} {{annotation.type | capitalize}} {% else %} {{annotation.type | capitalize}} {% endif %}Page {{annotation.page}}
{%- endif %}
{%- if annotation.imageRelativePath -%}
![[{{annotation.imageRelativePath}}]] {%- endif %}
{% if annotation.comment %}
{{annotation.comment}}
{% endif %}
{% if annotation.allTags %}
{{annotation.allTags}}
{% endif %}
{% endfor -%}
‘’’

1 Like

I don’t know what you are expecting Highlightr to do? Am I missing something?

As for how to get different highlights out of Zotero, see templates from this thread:

Maybe try working your way up from the last posts, rather than starting from the top.

1 Like

I just want to have the colors of my highlights on zotero reflected in obsidian. Wether it’s via highlightr or as colored callouts or anything.
I checked that thread. The only ones that produced color did it in a non cgronological way (they regroup the same colored highlights under the same category.
The snippets don’t seem to work for me. I have them on in the settings and added the files as instructed, but for a reason obsidian isn’tpicking on them.
I have Anuppuccin extended on and Callout Manager. IDK if there’s any interference with those

1 Like

I found a workaround. It’s not what I exactly wanted but it will do.

> {% for annotation in annotations %}{% if annotation.annotatedText %}
> > 		<span style="color: {{annotation.color}};">&#9632;</span> {{annotation.annotatedText}} [Page. {{annotation.page}}](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.page}}&annotation={{annotation.id}}) 
> 
> {% elif  annotation.imageRelativePath %}
> > <span style="color: {{annotation.color}};">&#9632;</span> ![[{{annotation.imageRelativePath}}\]]
> {%- endif %}
> {% if annotation.comment %}- [b] {{annotation.comment}}
> 				{% endif %}
> 		
>  {% if annotation.allTags %} {{annotation.allTags}}
> 		{% endif %} 
> 		{% endfor %}