Trinks icon

Trinks

Nó N8N para interagir com a API do Trinks

Actions46

Overview

This node integrates with the Trinks API to create new customer records ("Clientes"). It sends customer data such as name, email, CPF (Brazilian individual taxpayer registry identification), gender, phone numbers, and other optional details to the API endpoint for client creation.

Typical use cases include automating customer onboarding processes in salons, clinics, or service businesses that use Trinks as their CRM system. For example, when a new lead is captured via a web form or another system, this node can automatically add the customer to Trinks without manual entry.

Properties

Name Meaning
Nome Customer's full name
Email Customer's email address
Cpf Customer's CPF number (Brazilian tax ID)
Genero Customer's gender: M = Masculino (Male), F = Feminino (Female), N = Não-Binário (Non-binary), X = Não informado (Not informed)
Sexo (Obsolete) Gender field, same options as "Genero", will be removed in future versions
Observacoes Additional notes or observations about the customer
Codigo Externo External code identifier for the customer
Telefones JSON array of phone objects, e.g., [{"tipo":"celular","numero":"11999999999"}]
Preferencias JSON object representing customer preferences

Output

The node outputs an array of JSON objects corresponding to each input item processed. Each output JSON contains the response from the Trinks API after creating the customer record. The structure depends on the API response but generally includes the created customer's details and identifiers.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential and an establishment ID credential configured in n8n to authenticate requests to the Trinks API.
  • The node uses the base URL https://api.trinks.com and sets appropriate headers including Accept, Content-Type, X-Api-Key, and estabelecimentoId.
  • The node depends on the @devlikeapro/n8n-openapi-node package and custom operation parsing logic bundled within the node implementation.

Troubleshooting

  • Common issues:

    • Missing or invalid API key or establishment ID credentials will cause authentication failures.
    • Incorrectly formatted JSON in the Telefones or Preferencias fields may cause request errors.
    • Using the obsolete Sexo property instead of Genero might lead to warnings or ignored values in future API versions.
  • Error messages:

    • "Operation POST /v1/clientes not found" indicates a misconfiguration or unsupported operation selection.
    • HTTP errors from the API (e.g., 400 Bad Request) usually indicate invalid or missing required fields; verify all mandatory properties are set correctly.
    • Network or connectivity errors suggest checking internet access and API endpoint availability.
  • To resolve errors, ensure:

    • Credentials are properly set up and valid.
    • Input data matches expected formats, especially JSON fields.
    • Use the Genero field for gender information rather than the deprecated Sexo.

Links and References

Discussion