Agendor icon

Agendor

Integração completa com Agendor CRM

Overview

This node integrates with the Agendor CRM platform to search for companies ("Empresas") based on different criteria. It supports searching by a specific company ID, by CNPJ (a Brazilian company registration number), or listing all companies with optional limits.

Common scenarios where this node is useful include:

  • Retrieving detailed information about a single company by its unique ID.
  • Looking up a company using its official CNPJ number.
  • Fetching a list of companies for reporting, synchronization, or bulk processing purposes.

Practical examples:

  • A workflow that triggers when a new lead is added and looks up the associated company by CNPJ to enrich lead data.
  • Periodic synchronization of all companies from Agendor into another system, optionally including custom fields.
  • Fetching a specific company’s details by ID to update records in an external database.

Properties

Name Meaning
Tipo de Busca Search type: "Por ID" (by specific company ID), "Por CNPJ" (by CNPJ number), "Listar Todos" (list all companies)
ID da Empresa Unique company ID in Agendor (required if searching by ID)
CNPJ Company CNPJ number (only digits, required if searching by CNPJ)
Incluir Campos Customizados Whether to include custom fields in the response (true/false)
Retornar Todos If true, return all results when listing all companies; otherwise limit applies
Limite Maximum number of results to return when listing all companies (1 to 100, default 50)

Output

The output JSON contains the company data retrieved from Agendor according to the search criteria. The structure varies depending on the search type:

  • By ID or CNPJ: Returns a single company object with detailed fields, including standard and optionally custom fields.
  • List All: Returns an array of company objects, each representing one company, limited by the limit property unless returnAll is true.

If custom fields are included, these appear alongside standard fields in the company objects.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with the Agendor CRM API.
  • The node uses HTTP requests to Agendor endpoints such as /organizations, /organizations/{id}, and /organizations/upsert.
  • No additional environment variables are needed beyond the API authentication setup.

Troubleshooting

  • Common issues:

    • Providing an invalid or missing company ID or CNPJ will result in errors or empty responses.
    • Exceeding API rate limits may cause request failures.
    • Not setting the required API key credential will prevent any API calls.
  • Error messages:

    • Errors returned from the Agendor API typically include messages indicating invalid parameters or authentication failure.
    • If the node throws an error about missing parameters, verify that the correct search type is selected and corresponding fields are filled.
  • Resolutions:

    • Double-check input values for correctness and completeness.
    • Ensure the API key credential is configured properly in n8n.
    • Use the "Retornar Todos" option carefully to avoid large data loads that might time out.

Links and References

Discussion