Trinks icon

Trinks

Nó N8N para interagir com a API do Trinks

Actions46

Overview

This node integrates with the Trinks API to update an existing appointment ("Agendamento") by its ID. It performs a PUT request to the endpoint /v1/agendamentos/{agendamentoId}, allowing users to modify details of a scheduled service such as the service type, client, professional, start time, duration, price, and additional notes.

Common scenarios for this node include:

  • Rescheduling or updating appointments in a salon, clinic, or service business.
  • Adjusting appointment details after client requests or changes in availability.
  • Automating updates to bookings based on external triggers or workflows.

For example, if a client calls to change their appointment time or service, this node can be used within an n8n workflow to update the booking automatically in the Trinks system.

Properties

Name Meaning
Agendamento Id The unique identifier of the appointment to update (required).
Servico Id The ID of the service associated with the appointment (required).
Cliente Id The ID of the client who made the appointment (required).
Profissional Id The ID of the professional assigned to the appointment (optional).
Data Hora Inicio The start date and time of the appointment in string format (required).
Duracao Em Minutos Duration of the appointment in minutes (required).
Valor The price or value of the appointment (required).
Observacoes Additional notes or observations about the appointment (optional).

Output

The node outputs the JSON response returned by the Trinks API after the update operation. This typically includes the updated appointment data reflecting the new values sent in the request.

The output is structured as:

{
  "json": {
    // Updated appointment object as returned by the API
  },
  "pairedItem": {
    "item": <index_of_input_item>
  }
}

No binary data 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 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 parsers internally but these are bundled and abstracted from the user.

Troubleshooting

  • Operation not found error: If the specified operation is incorrect or missing, the node will throw an error listing available operations. Ensure the operation name matches exactly "PUT /v1/agendamentos/{agendamentoId}".
  • Missing required parameters: The node requires certain fields like Agendamento Id, Servico Id, Cliente Id, Data Hora Inicio, Duracao Em Minutos, and Valor. Omitting any of these will cause the API call to fail.
  • Authentication errors: Verify that the API key and establishment ID credentials are correctly set up in n8n.
  • Invalid date/time format: The Data Hora Inicio must be a valid string representing date and time accepted by the API.
  • API errors: Any errors returned by the Trinks API (e.g., invalid IDs, conflicts) will be passed through in the node's output. Review the error message for troubleshooting.

Links and References

Discussion