Integre.me - CNPJ icon

Integre.me - CNPJ

CNPJ - Unique Brazilian Company Reference.

Overview

This node, Integre.me - CNPJ, retrieves information about a Brazilian company using its CNPJ (Cadastro Nacional da Pessoa Jurídica), which is the unique identifier for companies in Brazil. The node sends a request to a public API (https://publica.cnpj.ws/cnpj/) and returns detailed company data based on the provided CNPJ.

Common scenarios:

  • Automating business verification processes.
  • Enriching CRM or ERP systems with up-to-date company information.
  • Validating supplier or customer details during onboarding.

Practical example:
A user can input a company's CNPJ number, and the node will fetch and return official registration details from the public database, which can then be used in further workflow steps.

Properties

Display Name Type Meaning
CNPJ String Enter a valid CNPJ (Brazilian company identifier). This is required to look up the company information.

Output

  • The output is a JSON object containing the response from the public CNPJ API.
  • If the request is successful, the json field contains all company data returned by the API.
  • If an error occurs and "Continue On Fail" is enabled, the json field will contain an error property with the error message.

Example output (success):

{
  "json": {
    "cnpj": "12345678000195",
    "razao_social": "Empresa Exemplo LTDA",
    "nome_fantasia": "Exemplo",
    "data_abertura": "2000-01-01",
    "...": "..."
  }
}

Example output (error, if continue on fail):

{
  "json": {
    "error": "Request failed with status code 404"
  }
}

Dependencies

  • External Service: Requires access to the public API at https://publica.cnpj.ws/cnpj/{CNPJ}.
  • No API Key Required: The endpoint appears to be public and does not require authentication.
  • n8n Configuration: No special environment variables or credentials are needed.

Troubleshooting

Common issues:

  • Invalid CNPJ: If the CNPJ is incorrectly formatted or does not exist, the API may return an error or empty result.
  • API Downtime: If the public API is unavailable, requests will fail.
  • Network Issues: Connectivity problems between n8n and the API endpoint can cause failures.

Error messages:

  • "Request failed with status code 404": The CNPJ was not found. Double-check the input value.
  • "Request failed with status code 400": The CNPJ format is invalid. Ensure you enter only numbers, without punctuation.
  • Other network or HTTP errors will appear in the error field if "Continue On Fail" is enabled.

How to resolve:

  • Verify that the CNPJ is correct and properly formatted.
  • Check the API's availability.
  • Ensure your n8n instance has internet access.

Links and References

Discussion