Trinks icon

Trinks

Nó N8N para interagir com a API do Trinks

Actions46

Overview

This node integrates with the Trinks API to retrieve promotional information related to a specific service. Specifically, for the operation GET /v1/servicos/{id}/promocoes, it fetches promotions associated with a given service identified by its ID.

Common scenarios where this node is beneficial include:

  • Marketing automation workflows that need to display or process current promotions for services.
  • Synchronizing promotional data from Trinks into other systems like CRMs or websites.
  • Triggering notifications or updates when promotions change for particular services.

For example, a user could input a service ID and automatically retrieve all active promotions for that service to update a marketing campaign or display on a booking platform.

Properties

Name Meaning
Id The unique numeric identifier of the service whose promotions are to be retrieved. This is a required property.

Output

The node outputs an array of JSON objects, each representing the response from the Trinks API for the requested promotions. The structure corresponds directly to the API's response schema for promotions linked to a service.

  • The json field contains the promotions data as returned by the API.
  • If multiple input items are processed, the output array contains corresponding results paired by item index.
  • In case of errors (and if "Continue On Fail" is enabled), the output includes an error message in the json.error field.

The node does not output binary data.

Dependencies

  • Requires an API key credential and an establishment ID credential to authenticate requests to the Trinks API.
  • The base URL for the API is https://api.trinks.com.
  • The node sets HTTP headers including Accept: application/json, Content-Type: application/json, and custom headers for API key and establishment ID.
  • No additional external dependencies beyond the Trinks API and n8n's HTTP request helper.

Troubleshooting

  • Operation Not Found Error: If the specified operation is not recognized, the node logs available operations and throws an error listing them. Ensure the operation name matches exactly.
  • Authentication Errors: Missing or invalid API key or establishment ID credentials will cause authentication failures. Verify credentials are correctly configured.
  • Invalid Service ID: Providing an invalid or non-existent service ID may result in empty responses or API errors.
  • Network Issues: Connectivity problems to api.trinks.com will cause request failures.
  • To resolve errors, check credentials, confirm the service ID exists, and verify network connectivity.

Links and References

  • Trinks API Documentation (general reference for API endpoints and data structures)
  • n8n HTTP Request Node documentation for understanding request configuration and error handling.

Discussion