> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/on-premises/pt/configuracao/overleaf-toolkit/integracao-com-o-zotero.md).

# Integração com o Zotero

{% hint style="info" %}
Esta funcionalidade foi inicialmente desenvolvida por [davrot](https://github.com/davrot) e [yu-i-i/overleaf-cep](https://github.com/yu-i-i/overleaf-cep), modificada por [ayaka-notes/overleaf-pro](https://github.com/ayaka-notes/overleaf-pro) com OAuth. Foi introduzida a partir da v6.2.0 e posteriores. Ainda está em estado beta. Precisamos do seu feedback se tiver algum problema.
{% endhint %}

<div data-with-frame="true"><figure><img src="/files/ba3d5baadacf39ce22bab0c29ed987ee9eac79f5" alt=""><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="/files/8b2496d01d8f97907f56fe807e1f4a7a49884da7" alt=""><figcaption></figcaption></figure></div>

### Configurar a integração com o Zotero

1. Abrir [este link](https://www.zotero.org/oauth/apps) para criar um cliente OAuth do Zotero (como mostra a imagem)
2. Escolha **Tipo de aplicação**: **Navegador**
3. Configure a URL de callback com o seu `${OVERLEAF_SITE_URL}/user/zotero/oauth/callback`&#x20;
4. Configure o seu `config/variables.env`&#x20;

<figure><img src="/files/7e38d050ac476b2103aac6e1c251ea7d9e3c4a90" alt="" width="375"><figcaption></figcaption></figure>

{% code title="config/variables.env" %}

```dotenv
#################
#    Zotero     #
#################
# 'zotero' deve estar em ENABLED_LINKED_FILE_TYPES (definido em develop/docker-compose.yml)
ENABLED_LINKED_FILE_TYPES=project_file,project_output_file,url,zotero

# De um cliente OAuth do Zotero (registe-se em https://www.zotero.org/oauth/apps)
# Tipo de aplicação: Navegador 
# URL de callback -> ${OVERLEAF_SITE_URL}/user/zotero/oauth/callback
ZOTERO_CLIENT_ID=
ZOTERO_CLIENT_SECRET=
# Encripta a chave da API do Zotero no Mongo (defina em dev para evitar escrever um ficheiro de chave
# em /var/lib/overleaf/data, que o contentor web de desenvolvimento não consegue criar)
# Como gerar: `openssl rand -hex 32`
ZOTERO_CIPHER_PASSWORD=dev-zotero-cipher-password
# Opcional: encaminhe os pedidos do Zotero do lado do servidor do módulo (OAuth + API) através de
# um proxy HTTP (deve ser acessível a partir do contentor web; igual a github-sync)
# http://10.0.0.1:10808
# (Opcional) ZOTERO_PROXY_URL=
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/on-premises/pt/configuracao/overleaf-toolkit/integracao-com-o-zotero.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
