> For the complete documentation index, see [llms.txt](https://ajuda.espiaonfe.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ajuda.espiaonfe.com.br/gestao/nfs-e-servico/configuracao/consulta-automatica-nacional.md).

# Consulta automática (nacional)

A **consulta automática para NFS-e** foi criada para simplificar o processo de consulta, eliminando o trabalho manual e tornando-o mais prático e eficiente.

### **Como funciona?** <a href="#como-funciona" id="como-funciona"></a>

* A consulta automática irá consultar as NFS-e's diretamente na SEFAZ Nacional.&#x20;
* Contudo, no caso das consultas automáticas, essa configuração será válida apenas para empresas que utilizam o [certificado do tipo A1](https://blog.espiaonfe.com.br/o-que-e-certificado-digital-para-que-serve/).

{% hint style="success" %}
**DICA**

**Configure pelo histórico de notas NFS-e:**&#x20;

1. No menu **“Histórico”**, selecione a opção **“NFS-e”**. Na aba **“Consultas automáticas (municipal)”**, selecione a empresa para a qual deseja configurar a consulta nacional.

<img src="/files/nrfgXGb2S9eYBZgtlBla" alt="" data-size="original">

2. Selecione o período em que deseja que a consulta seja realizada.

<img src="/files/rQTBhf6w5CYDLktyHw1Y" alt="" data-size="original">
{% endhint %}

#### 📃 Para configurar as consultas automáticas, siga as etapas a a seguir: <a href="#para-configurar-as-consultas-automaticas-siga-as-etapas-a-a-seguir" id="para-configurar-as-consultas-automaticas-siga-as-etapas-a-a-seguir"></a>

1. Para configurar a consulta automática, vá até o menu de **Cadastros** e clique em **Empresas**

<div align="left"><figure><img src="/files/pHIJvlonS1B2aiPGzAOJ" alt="" width="250"><figcaption></figcaption></figure></div>

2. Na aba **“Gestão”**, clique no ícone identificado como **“Configurações”**.

<div align="left"><figure><img src="/files/rf8Qwu0a6wDecMdclxPl" alt="" width="563"><figcaption></figcaption></figure></div>

3. Na seção **“Consulta automática"** escolha o horário em que deseja que as consultas de **NFS-e** sejam realizadas.

<div align="left"><figure><img src="/files/LOYhEfSMbXoZIqeiy46N" alt="" width="363"><figcaption></figcaption></figure></div>

4. Clique em **Salvar** e está feito, o espião está configurado para fazer consultas automáticas.

![](/files/HGdbJlxzZI3MyOtbF8mZ)<br>


---

# 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://ajuda.espiaonfe.com.br/gestao/nfs-e-servico/configuracao/consulta-automatica-nacional.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.
