Trinks icon

Trinks

Nó N8N para interagir com a API do Trinks

Actions46

Overview

This node integrates with the Trinks API to create new scheduling entries ("Agendamentos"). It allows users to programmatically book appointments or services by specifying details such as service ID, client ID, professional ID, start time, duration, price, and optional notes. This is useful for automating appointment management in salons, clinics, or any service-based business that uses Trinks for scheduling.

Practical examples include:

  • Automatically creating a booking when a customer fills out a form on a website.
  • Syncing appointments from another system into Trinks.
  • Creating scheduled reminders or follow-ups based on newly created appointments.

Properties

Name Meaning
Servico Id Numeric identifier of the service being booked.
Cliente Id Numeric identifier of the client for whom the appointment is made.
Profissional Id Numeric identifier of the professional assigned to the appointment (optional).
Data Hora Inicio Start date and time of the appointment in string format (e.g., ISO 8601 datetime).
Duracao Em Minutos Duration of the appointment in minutes.
Valor Price or value of the appointment.
Observacoes Optional textual notes or observations related to the appointment.
Confirmado Boolean flag indicating whether the appointment is confirmed (default: true).

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 appointment. The structure reflects the created appointment's data as returned by the API, including identifiers, timestamps, status, and other relevant fields.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential and an establishment identifier configured in n8n credentials to authenticate requests to the Trinks API.
  • The node sends HTTP requests to https://api.trinks.com with appropriate headers including the API key and establishment ID.
  • The node depends on the @devlikeapro/n8n-openapi-node package and custom operation parsing logic bundled within the node implementation.

Troubleshooting

  • Common issues:

    • Missing required properties such as Servico Id, Cliente Id, Data Hora Inicio, Duracao Em Minutos, or Valor will cause the API request to fail.
    • Incorrect date-time format in Data Hora Inicio may lead to validation errors from the API.
    • Invalid or missing API key or establishment ID credentials will result in authentication errors.
    • Network connectivity issues can prevent successful API calls.
  • Error messages:

    • "Operation POST /v1/agendamentos not found" indicates a misconfiguration or typo in the operation name.
    • API error responses will be passed through in the output JSON under an error field if "Continue On Fail" is enabled.
    • Authentication failures typically return 401 or 403 HTTP status codes; verify API key and establishment ID correctness.
  • Resolution tips:

    • Ensure all required fields are provided and correctly formatted.
    • Verify credentials in n8n are set up properly.
    • Use the node's "Continue On Fail" option during testing to capture error details without stopping workflow execution.

Links and References

Discussion