Trustic API icon

Trustic API

Integração com a API Trustic para análises de compliance e antifraude

Overview

This node integrates with the Trustic API to perform compliance and antifraud checks, specifically providing a basic information lookup for an individual based on their CPF (Brazilian individual taxpayer registry identification). It is useful in scenarios where you need to verify or enrich personal data for identity validation, fraud prevention, or customer onboarding processes.

A practical example: given a CPF number, the node fetches detailed personal data such as phone numbers, emails, and addresses, applying optional filters like minimum confidence scores or WhatsApp availability on phones. This helps businesses ensure they have accurate and relevant contact information.

Properties

Name Meaning
CPF The CPF number of the individual to query. Must be exactly 11 digits (numbers only). Used to identify the person for the basic information lookup.
Opções Adicionais A collection of additional options to customize the request and response filtering:
- Continuar Em Erro Whether to continue workflow execution if an error occurs during the request (boolean).
- Filtrar Apenas WhatsApp Filter phone numbers by WhatsApp availability. Options: "Todos" (all phones), "Apenas WhatsApp" (only phones with WhatsApp), "Apenas Sem WhatsApp" (only phones without WhatsApp).
- Headers Customizados Additional HTTP headers to send with the API request (JSON object).
- Query Parameters Additional query parameters to append to the API URL (JSON object).
- Score Mínimo Email Minimum confidence score (0-5) to filter email addresses returned. Only emails with score >= this value are included.
- Score Mínimo Endereço Minimum confidence score (0-5) to filter addresses returned. Only addresses with score >= this value are included.
- Score Mínimo Telefone Minimum confidence score (0-5) to filter phone numbers returned. Only phones with score >= this value are included.
- Timeout Request timeout in milliseconds (default 30000 ms).

Output

The node outputs JSON data containing the basic information about the individual associated with the provided CPF. The structure includes fields such as:

  • phones: An array of phone objects, each possibly including a score and a boolean indicating WhatsApp availability.
  • emails: An array of email objects, each with a confidence score.
  • addresses: An array of address objects, each with a confidence score.

The output respects the filters applied via the input properties, so only items meeting the minimum score thresholds and WhatsApp filters appear.

If multiple results are returned, each is output as a separate item in the node's output array.

In case of errors (and if configured to continue on failure), the output will contain an error field with the message and optionally details from the API response.

No binary data is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with the Trustic API.
  • The node makes HTTP GET requests to the Trustic API endpoint /v1/compliance/pf/{cpf}/basic-info.
  • Optional environment variable NODE_ENV affects debug logging but does not impact functionality.
  • No other external dependencies beyond standard n8n credentials and HTTP request capabilities.

Troubleshooting

  • Common issues:

    • Invalid CPF format: The CPF must be exactly 11 numeric characters; otherwise, the request will fail.
    • Network timeouts: If the API does not respond within the specified timeout, the request will error out.
    • API authentication errors: Missing or invalid API key credential will cause authorization failures.
    • Filtering too restrictive: Setting high minimum scores or strict WhatsApp filters may result in empty arrays in the output.
  • Error messages:

    • "Operação desconhecida: ..." — indicates an unsupported operation was requested; ensure the operation name is correct.
    • API errors returned from Trustic will be passed through unless "Continuar Em Erro" is enabled, in which case the error details are output as JSON.
  • Resolutions:

    • Validate CPF input before running the node.
    • Check API key validity and permissions.
    • Adjust timeout and filtering options to suit your data quality needs.
    • Enable "Continuar Em Erro" to allow workflows to proceed despite occasional API errors.

Links and References

Discussion