Actions46
- Agendamentos Actions
- GET /v1/agendamentos
- POST /v1/agendamentos
- GET /v1/agendamentos/{id}
- PUT /v1/agendamentos/{agendamentoId}
- PATCH /v1/agendamentos/{agendamentoId}/status/confirmado
- PATCH /v1/agendamentos/{agendamentoId}/status/cancelado
- PATCH /v1/agendamentos/{agendamentoId}/status/finalizado
- PATCH /v1/agendamentos/{agendamentoId}/status/clientefaltou
- PATCH /v1/agendamentos/{agendamentoId}/status/ematendimento
- GET /v1/agendamentos/profissionais/{data}
- Clientes Actions
- Clientes Creditos Actions
- Clientes Etiquetas Actions
- Clientes Telefones Actions
- Clientes Vales Presentes Actions
- Clube De Assinaturas Actions
- Estabelecimentos Actions
- Etiquetas Actions
- Fidelidade Actions
- Financeiro Formas Pagamento Actions
- Financeiro Motivos Descontos Actions
- Financeiro Transacoes Actions
- Financeiro Vendas De Produto Actions
- Produtos Actions
- Profissionais Actions
- Servicos Actions
Overview
This node integrates with the Trinks API to update the status of a specific appointment ("Agendamento") to "cancelado" (canceled). It is designed to send a PATCH request to the endpoint /v1/agendamentos/{agendamentoId}/status/cancelado, allowing users to mark an appointment as canceled by providing the appointment ID, who canceled it, and the reason for cancellation.
Common scenarios include:
- Automating appointment cancellations in scheduling workflows.
- Syncing cancellation status from external systems into Trinks.
- Managing appointment lifecycle states programmatically.
Practical example:
- A salon booking system automatically cancels appointments when customers notify via a chatbot, updating the Trinks system accordingly.
Properties
| Name | Meaning |
|---|---|
| Agendamento Id | The unique numeric identifier of the appointment to be canceled. |
| Quem Cancelou | Numeric identifier representing who performed the cancellation (e.g., user or system ID). |
| Motivo | Textual reason explaining why the appointment was canceled. |
Output
The node outputs the JSON response returned by the Trinks API after attempting to cancel the appointment. This typically includes confirmation of the updated status or error details if the operation failed.
No binary data output is produced by this node.
Example output structure (simplified):
{
"id": 123,
"status": "cancelado",
"quemCancelou": 456,
"motivo": "Cliente não compareceu",
"updatedAt": "2024-06-01T12:00:00Z"
}
Dependencies
- Requires an API key credential and an establishment ID configured in n8n credentials to authenticate requests to the Trinks API.
- The node sends HTTP PATCH requests to
https://api.trinks.com. - Proper network access to the Trinks API endpoint is necessary.
Troubleshooting
Common issues:
- Invalid or missing API key or establishment ID will cause authentication failures.
- Providing an invalid or non-existent
Agendamento Idwill result in errors from the API. - Missing required properties (
quemCancelouormotivo) may cause the request to fail validation.
Error messages:
"Operation ... not found": Indicates the selected operation is not recognized; ensure the correct resource and operation are chosen.- HTTP 4xx or 5xx errors from the API: Check credentials, input values, and API availability.
Resolution tips:
- Verify all required fields are correctly set.
- Confirm API credentials are valid and have sufficient permissions.
- Inspect the API response message for detailed error information.
Links and References
- Trinks API Documentation (hypothetical link)
- n8n documentation on HTTP Request Node for understanding underlying request mechanics.