# Zotero Integration – Import Templates?

**URL:** <https://forum.obsidian.md/t/zotero-integration-import-templates/36310>\
**Category:** Workflows & Templates\
**Tags:** templates\
**Created:** [April 22, 2022, 12:59pm UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310 "2022-04-22T12:59:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![brimwats](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/b/e99b99/32.png) [@brimwats](https://forum.obsidian.md/u/brimwats)\
**Post date:** [April 22, 2022, 12:59pm UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/1 "2022-04-22T12:59:55Z")

</div>

Hey folks,

I was wondering if anyone had made templates for @mgmeyers [Zotero Desktop Connector plugin.](https://github.com/mgmeyers/obsidian-zotero-desktop-connector)?

There are instructions on how to do it in Nunjucks at this link, but I haven’t thought through it yet and learned nunjucks and thought I’d start this thread to see if anyone else had! [Templating.md](https://github.com/mgmeyers/obsidian-zotero-desktop-connector/blob/main/docs/Templating.md)

---

<div class="post-metadata">

**Author:** ![mgmeyers](https://forum.obsidian.md/user_avatar/forum.obsidian.md/mgmeyers/32/7826_2.png) [@mgmeyers](https://forum.obsidian.md/u/mgmeyers)\
**Post date:** [April 23, 2022, 6:52pm UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/2 "2022-04-23T18:52:22Z")

</div>

Here’s mine!

```markdown
---
cssclass: literature-note
alias: [{% if shortTitle %}"{{shortTitle | safe}}"{% else %}"{{title | safe}}"{% endif %}]
---
{%- macro colorValueToName(color) -%}
	{%- switch color -%}
		{%- case "#ffff7f" -%}
			Relevant / important
		{%- case "#ff7f7f" -%}
			Disagree
		{%- case "#ffbf7f" -%}
			Questions / confusion
		{%- case "#7fff7f" -%}
			Agree
		{%- case "#7fffff" -%}
			Relevant to current task
		{%- case "#ff7fff" -%}
			TODO / follow up
		{%- case "#bf7fbf" -%}
			Definitions / concepts
		{%- default -%}
			Interesting but not relevant
	{%- endswitch -%}
{%- endmacro -%}

{%- macro calloutHeader(type) -%}
	{%- switch type -%}
		{%- case "highlight" -%}
			Highlight
		{%- case "strike" -%}
			Strikethrough
		{%- case "underline" -%}
			Underline
		{%- case "image" -%}
			Image
		{%- default -%}
			Note
	{%- endswitch -%}
{%- endmacro %}

> [!info]
> - **Cite Key:** [[@{{citekey}}]]
{%- for attachment in attachments | filterby("path", "endswith", ".pdf") %}
> - **Link:** [{{attachment.title}}](file://{{attachment.path | replace(" ", "%20")}})
{%- endfor -%}
{%- if abstractNote %}
> - **Abstract:** {{abstractNote}}
{%- endif -%}
{%- if bibliography %}
> - **Bibliography:** {{bibliography}}
{%- endif %}
{%- if hashTags %}
> - **Tags:** {{hashTags}}
{%- endif %}

## Annotations
{% persist "annotations" %}
{% set annots = annotations | filterby("date", "dateafter", lastImportDate) -%}
{% if annots.length > 0 %}
### Imported on {{importDate | format("YYYY-MM-DD h:mm a")}}

{% for color, annots in annots | groupby("color") -%}
#### {{colorValueToName(color)}}

{% for annot in annots -%}
> [!quote{% if annot.color %}|{{annot.color}}{% endif %}] {{calloutHeader(annot.type)}}
{%- if annot.annotatedText %}
> {{annot.annotatedText | nl2br}}
{%- endif -%}
{%- if annot.imageRelativePath %}
> ![[{{annot.imageRelativePath}}]]
{%- endif %}
{%- if annot.ocrText %}
> {{annot.ocrText}}
{%- endif %}
{%- if annot.comment %}
>
>> {{annot.comment | nl2br}}
{%- endif %}
>
> [Page {{annot.page}}](zotero://open-pdf/library/items/{{annot.attachment.itemKey}}?page={{annot.page}}) [[{{annot.date | format("YYYY-MM-DD#h:mm a")}}]]

{% endfor -%}
{% endfor -%}
{% endif %}
{% endpersist %}

```

I use it with this CSS snippet to style callouts:

```css
/* Yellow */
.literature-note .callout[data-callout-metadata="#ffff7f"] {
  --callout-color: 255, 204, 0;
}

/* Red */
.literature-note .callout[data-callout-metadata="#ff7f7f"] {
  --callout-color: 255, 59, 48;
}

/* Orange */
.literature-note .callout[data-callout-metadata="#ffbf7f"] {
  --callout-color: 255, 149, 0;
}

/* Green */
.literature-note .callout[data-callout-metadata="#7fff7f"] {
  --callout-color: 40, 205, 65;
}

/* Blue */
.literature-note .callout[data-callout-metadata="#7fffff"] {
  --callout-color: 0, 122, 255;
}

/* Pink */
.literature-note .callout[data-callout-metadata="#ff7fff"] {
  --callout-color: 255, 87, 255;
}

/* Purple */
.literature-note .callout[data-callout-metadata="#bf7fbf"] {
  --callout-color: 125, 84, 222;
}

```

---

<div class="post-metadata">

**Author:** ![erazlogo](https://forum.obsidian.md/user_avatar/forum.obsidian.md/erazlogo/32/16077_2.png) [@erazlogo](https://forum.obsidian.md/u/erazlogo)\
**Post date:** [May 16, 2022, 2:04am UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/3 "2022-05-16T02:04:15Z")

</div>

Here is mine  
updated 2002-07-27, incorporates annotation colors;  
updated 2022-07-16, incorporates Zotero Integration update that allows to import Zotero 6 annotations directly  
updated 2022-08-13 incorporates an option to add new annotations into the same note on second import (if note is not renamed or deleted)

```auto
---
cssclass: research-note
type: "{{itemType}}"{% for type, creators in creators | groupby("creatorType") -%}{% if loop.first %}
{% endif %}{{type | replace("interviewee", "author") | replace("director", "author") | replace("presenter", "author") | replace("podcaster", "author") | replace("programmer", "author") | replace("cartographer", "author") | replace("inventor", "author") | replace("sponsor", "author") | replace("performer", "author") | replace("artist", "author")}}: "{%- for creator in creators -%}{%- if creator.name %}{{creator.name}}{%- else %}{{creator.lastName}}, {{creator.firstName}}{%- endif %}{% if not loop.last %}; {% endif %}{% endfor %}"{% if not loop.last %}
{% endif %}{%- endfor %}{% if title %}
title: "{{title}}"{% endif %}{% if publicationTitle %}
publication: "{{publicationTitle}}"{% endif %}{% if date %}
date: {{date | format("YYYY-MM-DD")}}{% endif %}{% if archive %}
archive: "{{archive}}"{% endif %}{% if archiveLocation %}
archive-location: "{{archiveLocation}}"{% endif %}
citekey: {{citekey}}
---
{{bibliography}}
[online]({{uri}}) [local]({{desktopURI}}) {%- for attachment in attachments | filterby("path", "endswith", ".pdf") %} [pdf](file://{{attachment.path | replace(" ", "%20")}})
{% if loop.last %} 
{% endif %}{%- endfor %}
 
{% if tags.length > 0 -%}{% for t in tags -%}#{% if t.tag == "secondary" %}source/secondary{% if not loop.last %}{% endif %}{% elif t.tag == "primary" %}source/primary{% if not loop.last %}{% endif %}{% elif "-project" in t.tag %}project/{{t.tag | lower | replace(" ", "-") | replace("-project", "")}}{% else %}subject/{{t.tag | lower | replace(" ", "-")}}{% endif %}{% if not loop.last %}
{% endif %}{%- endfor %}{%- endif %}

### Index

start-date:: {% if date %}{{date | format("YYYY-MM-DD")}}{% endif %}
end-date::
page-no:: {% for annotation in annotations %}{% if loop.first %}{{annotation.pageLabel}}{% endif %}{% endfor %}

### Connections

comment:: 

### Note
{% macro calloutHeader(color) -%}
{%- if color == "#ff6666" -%}
Important
{%- endif -%}
{%- if color == "#5fb236" -%}
Reference
{%- endif -%}
{%- if color == "#2ea8e5" -%}
Undefined - Blue
{%- endif -%}
{%- if color == "#a28ae5" -%}
Undefined - Purple
{%- endif -%}
{%- endmacro -%}

{% persist "annotations" %}
{% set annotations = annotations | filterby("date", "dateafter", lastImportDate) -%}
{% if annotations.length > 0 %}
### Imported on {{importDate | format("YYYY-MM-DD h:mm a")}}

{%- for annotation in annotations %}
{% if annotation.color !== "#ffd400" %}
>[!quote{% if annotation.color %}|{{annotation.color}}{% endif %}] {{calloutHeader(annotation.color)}}
>{%- endif -%}{% if annotation.imageRelativePath %}
![[{{annotation.imageRelativePath}}]] {% endif %}{% if annotation.annotatedText %}
{{annotation.annotatedText}} [(p. {{annotation.pageLabel}})](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.pageLabel}}&annotation={{annotation.id}}){%- endif %}{%- if annotation.comment%}
%%{{annotation.comment}}%%{%- endif %}{%- endfor %}{% endif %} {% endpersist %}

```

For annotation colors, you will need to put this snippet in `your vault/.obsidian/snippets/` (adapted from mgmeyers template above)

```auto
/* Yellow */
.research-note .callout[data-callout-metadata="#ffd400"] {
  --callout-color: 255, 204, 0;
}

/* Red */
.research-note .callout[data-callout-metadata="#ff6666"] {
  --callout-color: 255, 59, 48;
}

/* Green */
.research-note .callout[data-callout-metadata="#5fb236"] {
  --callout-color: 40, 205, 65;
}

/* Blue */
.research-note .callout[data-callout-metadata="#2ea8e5"] {
  --callout-color: 0, 122, 255;
}

/* Purple */
.research-note .callout[data-callout-metadata="#a28ae5"] {
  --callout-color: 125, 84, 222;
}

```

My template works with Zotero 6 annotations (using Zotero notes template) rather than via Zotfile.

It separates authors by type so I can use Dataview to search by letter recipient and interviewer. It also imports Zotero tags for type of source and project name. And it includes a template for data entry, including fields for page number and for my comments.

Note: This template does not assign a color to yellow because I use yellow for when I need to export annotations without colors.

See more at [01 Notetaking for Historians - Doing History with Zotero and Obsidian - Obsidian Publish](https://publish.obsidian.md/history-notes/01+Notetaking+for+Historians)

---

<div class="post-metadata">

**Author:** ![Feralflora](https://forum.obsidian.md/user_avatar/forum.obsidian.md/feralflora/32/56208_2.png) [@Feralflora](https://forum.obsidian.md/u/Feralflora)\
**Post date:** [May 23, 2022, 5:15pm UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/4 "2022-05-23T17:15:47Z")

</div>

Thanks for sharing your template, it looks very intriguing. Any chance you could share some screenshots of what the result looks like, and expand a bit on your workflow?

---

<div class="post-metadata">

**Author:** ![Swampy](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/s/a6a055/32.png) [@Swampy](https://forum.obsidian.md/u/Swampy)\
**Post date:** [June 7, 2022, 10:06pm UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/5 "2022-06-07T22:06:49Z")

</div>

I have two minor, newbee questions:

1. How can we download or cut-and-paste these templates so they render correctly in Obsidian?
2. The [proper extension for nunjucks templates is .njk](https://mozilla.github.io/nunjucks/templating.html#user-defined-templates-warning). But Obsidian seems to want to add “.md” to the end. Is there a way to avoid this?

---

<div class="post-metadata">

**Author:** ![Feralflora](https://forum.obsidian.md/user_avatar/forum.obsidian.md/feralflora/32/56208_2.png) [@Feralflora](https://forum.obsidian.md/u/Feralflora)\
**Post date:** [June 8, 2022, 8:20am UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/6 "2022-06-08T08:20:53Z")

</div>

Just copy and paste the text into a new markdown note, and remove the ``` at the beginning and end of the template, so it is not treated as a code block.

Then, link to that file in the Zotero Integration settings. No need for the .njk extension to work with this plugin.

---

<div class="post-metadata">

**Author:** ![Swampy](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/s/a6a055/32.png) [@Swampy](https://forum.obsidian.md/u/Swampy)\
**Post date:** [June 8, 2022, 7:16pm UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/7 "2022-06-08T19:16:39Z")

</div>

Thanks for the tip about the ```. I should have recognized this.

Regarding the .njk, I understand it’s not entirely necessary. But a major feature of Obsidian using MD files is to allow multiple apps to use the files. Suppose I want to set up Vim to be the default editor of nunjucks templates. In such cases, clicking on a .njk file would open it in Vim. The whole point of creating and following such standards is to (a) make such files readily recognizable for what they are and (b) facilitate such things as opening files in the proper app, sed scripts that work a certain way depending on filename extensions, etc. Insisting on adding .md as the file extension to a file that’s not really a markdown file is, IMHO, bad software practice.

---

<div class="post-metadata">

**Author:** ![apfelstrudelig](https://forum.obsidian.md/user_avatar/forum.obsidian.md/apfelstrudelig/32/24656_2.png) [@apfelstrudelig](https://forum.obsidian.md/u/apfelstrudelig)\
**Post date:** [June 14, 2022, 12:32pm UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/8 "2022-06-14T12:32:54Z")

</div>

Here’s my current Template 👀

**Edits:**

**The gist linked here is not updated anymore, see:** [https://forum.obsidian.md/t/zotero-integration-import-templates/36310/96?u=apfelstrudelig](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/96)

2022-07-19 Updated to add more DV keys to pull info into table, show annotation colours as `<mark>` highlights, change metadata fields

2022-07-28 Didn’t like the full on mark highlights, opted for spans instead that change the font colour

2022-08-22 Major update! Split my templates into two. One for metadata and notes, the other for highlights and whatever commentary I added. I also snagged a trick from @Leah to get nice little coloured squares instead of coloured notes because I was still feeling iffy about them. You can find the earlier versions by clicking on “Revisions”.

2023-01-09 Updated to use different tags, add non-Templater version, remove some metadata as I don’t use it (all previous versions are still accessible!)

> <https://gist.github.com/lguenth/e8a5c4fa0b4a1ed6f8bd0b9ccfc31013>

---

<div class="post-metadata">

**Author:** ![Feralflora](https://forum.obsidian.md/user_avatar/forum.obsidian.md/feralflora/32/56208_2.png) [@Feralflora](https://forum.obsidian.md/u/Feralflora)\
**Post date:** [June 14, 2022, 9:27pm UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/9 "2022-06-14T21:27:30Z")

</div>

Nice template, thanks for sharing. Could you explain how this part works: `replace(" **Highlights: Blue**", "Info")`?

Where is the highlight information coming from?

---

<div class="post-metadata">

**Author:** ![apfelstrudelig](https://forum.obsidian.md/user_avatar/forum.obsidian.md/apfelstrudelig/32/24656_2.png) [@apfelstrudelig](https://forum.obsidian.md/u/apfelstrudelig)\
**Post date:** [June 17, 2022, 11:54am UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/10 "2022-06-17T11:54:46Z")

</div>

This is taken from a Zotfile template with enabled colour grouping. I extract the annotations and the notes all end up having the “Highlights: Colour” as their heading, so I can replace it with the actual meaning. It’s not as sophisticated as I’d like it to be. 😅

---

<div class="post-metadata">

**Author:** ![gustafferson](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/g/4491bb/32.png) [@gustafferson](https://forum.obsidian.md/u/gustafferson)\
**Post date:** [July 23, 2022, 2:55pm UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/11 "2022-07-23T14:55:32Z")

</div>

Hi I was having the same issue as OP but only found this post after making my own template. I’m no expert in nunjucks or Obsidian but this works well for my setup. There’s an image showing roughly what the output is.

Annotations from Zotero 6 internal pdf viewer are imported into an `### Annotations` subheading, each annotation is nested inside of an admonition note (`ad-note`) for easy styling. Rectangle annotations will be pasted into the literature note inside their own block as images, as they are imported into your vault by the desktop connector. If you want to edit the callout (ad-note) blocks that’s easy enough by changing the values in the macro as per the admonition documentation. I find this easier than messing with the CSS options, for just certain files.

New annotations can be added to your literature note without fear of them overwriting the original file as there is a persist block for existing annotations. New annotations will be included under a separate heading with a new timestamp.

 ![image](https://forum.obsidian.md/uploads/default/original/3X/0/4/04292c5638709e62f188bb22f8ef45d4f764fd28.png)

[The template is here](https://gist.github.com/Gustafferson/698e92d1ac939d60a63aac35fe4c4c4e)

---

<div class="post-metadata">

**Author:** ![Zocahontas](https://forum.obsidian.md/user_avatar/forum.obsidian.md/zocahontas/32/21657_2.png) [@Zocahontas](https://forum.obsidian.md/u/Zocahontas)\
**Post date:** [July 25, 2022, 7:59pm UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/12 "2022-07-25T19:59:04Z")

</div>

Here is the section I use specifically for annotations, it is pretty much @mgmeyers template but with the added benefit of working with @Chetachi [Highlightr](https://github.com/chetachiezikeuzor/Highlightr-Plugin) plugin:

```auto
## Annotations
{% persist "annotations" %}

{% set annots = annotations | filterby("date", "dateafter", lastImportDate) -%}

{% if annots.length > 0 %}
{% for annot in annots -%}
{%- if annot.annotatedText %}
- <mark style="background: {{annot.color}}">{{annot.annotatedText | nl2br}} </mark>
{%- endif -%}

{%- if annot.imageRelativePath %}
![[{{annot.imageRelativePath}}]]
{%- endif %}

{%- if annot.comment %}
>[!annot] Comment
>{{annot.comment | nl2br}}
 {%- endif %}

{%- endfor %}
{%- endif %}
{%- endpersist %}

```

It pulls the color hex code from the annotation data and uses that to determine the highlight color. I think you need css-inline enabled in Highlightr to use this.

So you get something that looks like this:

 ![image](https://forum.obsidian.md/uploads/default/original/3X/0/5/05a4e58bdc4140c853735835a96abb7c3eea4afa.jpeg)

Sidenote: I noticed that any document with pen annotations, like handwritten notes from using an apple pencil on the zotero ios app, will completely fail to import. Is this a known issue? If not, is there somewhere I should post about this?

---

<div class="post-metadata">

**Author:** ![Tombychan](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/t/da6949/32.png) [@Tombychan](https://forum.obsidian.md/u/Tombychan)\
**Post date:** [August 3, 2022, 9:46pm UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/13 "2022-08-03T21:46:15Z")

</div>

Thank you so much for this template segment. The annotation format looks really good. Is there a way to add the page numbers and a link to the location in the file on Zotero, though?

---

<div class="post-metadata">

**Author:** ![ingewertwijn](https://forum.obsidian.md/user_avatar/forum.obsidian.md/ingewertwijn/32/16405_2.png) [@ingewertwijn](https://forum.obsidian.md/u/ingewertwijn)\
**Post date:** [August 4, 2022, 8:03pm UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/14 "2022-08-04T20:03:44Z")

</div>

I am looking for documentation that I can understand (I am not a programmer and have no clear idea how Zotero and Obsidian are linked, technically).  
The documentation with the plugin is too complicated for me, and also, seems to start in the middle, so I don’t get a sense of what to do.  
Has anyone seen a simpler instruction or examples?

---

<div class="post-metadata">

**Author:** ![scholarInTraining](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/s/cc9497/32.png) [@scholarInTraining](https://forum.obsidian.md/u/scholarInTraining)\
**Post date:** [August 5, 2022, 5:08am UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/15 "2022-08-05T05:08:48Z")

</div>

> [@ingewertwijn](#):
>
> (I am not a programmer and have no clear idea how Zotero and Obsidian are linked, technically).

This part I can kind of help with, even though I am not very familiar with the specifics of the plugin. The two programs are not at all linked, by default. They use different file extensions and think about different things. Zotero with the plugin BetterBibTeX knows how to export BibTeX `.bib` files, which are a plaintext representation of a bibliography. The various Zotero/citation-related plugins for Obsidian are (as far as I know) programs to read that `.bib` file and help you extract the bibliographic information inside from BibTeX into Markdown (Obsidian’s file format).  
Instead of just dumping that bibliographic information directly to a Markdown file, deciding for themselves “oh the title of the file is going to be the citekey and heading 1 is going to be the article title and then there will be a heading 2 with the author names” etc. which would probably not match anyone’s exact preferences, these plugins all try to let their users (you!) decide what order you want the bibliographic information in your Markdown file, and how you want to format it.  
Probably the easiest way to experiment with this is to take an existing template like @apfelstrudelig’s, see what order and formatting are produced, and then try to change it around to match what you like!

Good luck!

---

<div class="post-metadata">

**Author:** ![Zocahontas](https://forum.obsidian.md/user_avatar/forum.obsidian.md/zocahontas/32/21657_2.png) [@Zocahontas](https://forum.obsidian.md/u/Zocahontas)\
**Post date:** [August 10, 2022, 11:37pm UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/16 "2022-08-10T23:37:52Z")

</div>

Hey! So looking at some of the other templates, if you want to add a page number and page link, add the following line in next to any of the annotation types where you want to have a page number link available.

```auto
[(pg. {{annot.page}})](zotero://open-pdf/library/items/{{annot.attachment.itemKey}}?page={{annot.page}})

```

I added a commented version of the annotations section of the previous template, indicating the type of annotation, and where I added the page number and page link. Currently, it is only added to text highlights.

Also, a small change from before, I will highlight headers and section titles in whatever text I am reading, and then directly edit the annotation to include ## to indicate a markdown header. I added a line or two to filter that and format appropriately so you get nice little markdown section headers from those highlights. It is really useful if you are annotating huge books and long review.

```auto

# Annotations
{% persist "annotations" %}
{% set annots = annotations | filterby("date", "dateafter", lastImportDate) -%}
{% if annots.length > 0 %}
{% for annot in annots -%}

{#- **Annotations that start with #, to be turned into markdown style section headers** -#}
{% if annot.annotatedText and "#" in annot.annotatedText %}
{{annot.annotatedText|nl2br|lower|title}} 

{#- **Regular text annotations w/ page number and page link** -#}
{%- elif annot.annotatedText %} 
- <mark style="background: {{annot.color}}">{{annot.annotatedText | nl2br}} </mark> [(pg. {{annot.page}})](zotero://open-pdf/library/items/{{annot.attachment.itemKey}}?page={{annot.page}}) {# **page link** #}
{%- endif -%}

{#- **Image annotations** -#}
{%- if annot.imageRelativePath %}
 ![[{{annot.imageRelativePath}}]]
{%- endif %}

{#- **comment annotations** -#}
{%- if annot.comment %}
>[!annot] Comment
>{{annot.comment | nl2br}}
 {%- endif %}

{%- endfor %}
{%- endif -%}
{%- endpersist -%}

```

Hope it is helpful!

---

<div class="post-metadata">

**Author:** ![apfelstrudelig](https://forum.obsidian.md/user_avatar/forum.obsidian.md/apfelstrudelig/32/24656_2.png) [@apfelstrudelig](https://forum.obsidian.md/u/apfelstrudelig)\
**Post date:** [August 22, 2022, 9:59pm UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/17 "2022-08-22T21:59:31Z")

</div>

RE: Pen annotations  
You could raise this issue in the plugin’s repository, over on GitHub.

---

<div class="post-metadata">

**Author:** ![NPop](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/n/7ea924/32.png) [@NPop](https://forum.obsidian.md/u/NPop)\
**Post date:** [September 16, 2022, 4:03am UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/18 "2022-09-16T04:03:14Z")

</div>

Is there any way to modify the template to dedicate a specific Zotero highlight color to output as a header in Obsidian?  
i.e. All blue highlights are inputted into the notes as “## Headers”

---

<div class="post-metadata">

**Author:** ![Sirpbele](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/s/5e9695/32.png) [@Sirpbele](https://forum.obsidian.md/u/Sirpbele)\
**Post date:** [September 18, 2022, 10:35am UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/19 "2022-09-18T10:35:38Z")

</div>

I love this thread, thanks to everybody for posting their templates! Helps & inspires me a lot 🙂

I really like the “Go to annotation” link that is included after every annotation when (in Zotero) I create a note from my annotations and then import it into obsidian. It brings you to the page and the annotation “flashes up” for a second. I originally wanted to ask for help to include this when importing annotations directly into obsidian, but with the help of @Zocahontas ’ page link code, I figured it out:  
I changed the link name to include the citekey, this way I can copy&paste the annotation including the link into other notes. Even if the link didn’t work for some reason, I would know where the annotation originally came from.

`[({{citekey}} pg. {{annot.page}})](zotero://open-pdf/library/items/{{annot.attachment.itemKey}}?page={{annot.page}}&annotation={{annot.id}})`

---

<div class="post-metadata">

**Author:** ![Sirpbele](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/s/5e9695/32.png) [@Sirpbele](https://forum.obsidian.md/u/Sirpbele)\
**Post date:** [September 18, 2022, 10:53am UTC](https://forum.obsidian.md/t/zotero-integration-import-templates/36310/20 "2022-09-18T10:53:05Z")

</div>

Thank you for posting your template! Could you please explain what “nl2br|lower|title” does? Is this HTML?

> [@Zocahontas](#):
>
> `{{annot.annotatedText|nl2br|lower|title}} `

[Next page](https://forum.obsidian.md/t/zotero-integration-import-templates/36310.md?page=2)
