My Zotero annotation template that works

I have made some tweaks to group and name annotations groups with the help of AI. See below for example.

---
{% if title %}Title: "{{title}}"{% endif %}
Authors: {{authors}}{{directors}}
{% if publicationTitle %}Publication: "{{publicationTitle}}"{% endif %}
{% if date %}Date: {{date | format("YYYY-MM-DD")}}{% endif %}
citekey: {{citekey}}
tags: {{hashTags}}
---
## {{title}}
Bibliography : {{bibliography}}
Link to publication : {{url}}
Link Zotero : {{pdfZoteroLink}}
Zotero Tags : {{hashTags}} 
>[!abstract]+
>« {{abstractNote}} »

{% set colorMappings = {

    "#5fb236": "Essential information (Green)",
    
    "#2ea8e5": "Unassigned color category (Blue)",

    "#aaaaaa": "Follow up references (Grey)",
    
    "#ff6666": "Author challenge / Disagreement (Red)",
      
    "#a28ae5": "Definition (Purple)",
     
    "#ffd400": "Highlight (Yellow)",

    "#e56eee": "Personal take (Magenta)",
      
    "#f19837": "Futher reading on concept (Orange)"

} %}

{% for color, calloutName in colorMappings %}
## <span style="color:{{color}}">{{calloutName}}</span>
{% for annotation in annotations %}
{% if annotation.color == color %}
>[!{{calloutName}}|{{annotation.color}}]+ 
>{%- if annotation.annotatedText -%}« {{annotation.annotatedText}} »([{{annotation.page}}](zotero://open-pdf/library/items/{{annotation.attachment.itemKey}}?page={{annotation.page}}&annotation={{annotation.id}})){% endif %}{% if annotation.imageRelativePath %}![[{{annotation.imageRelativePath}}]]{% endif %}{% if annotation.comment %} 
>
>{{annotation.comment}}{%- endif %}
{% endif %}
{% endfor %}
{% endfor %}