Overview
This node integrates with the Shlink URL shortener service, allowing users to interact with its API endpoints. Specifically, the "Short URL" resource with the "List" operation enables retrieving a paginated list of shortened URLs managed by Shlink. This is useful for scenarios where you want to display, analyze, or process batches of short URLs created in your Shlink instance.
Practical examples include:
- Fetching all short URLs created within an account for reporting or auditing.
- Integrating with other systems to synchronize or update URL metadata.
- Building dashboards that show usage statistics or URL inventories.
Properties
| Name | Meaning |
|---|---|
| Page | Page Number (starting from 1) to retrieve. |
| Items / Page | Number of items to return per page. |
These properties control pagination when listing short URLs, allowing you to navigate through large sets of data efficiently.
Output
The output contains a JSON array of short URL objects retrieved from the Shlink API. Each object typically includes details such as the short URL identifier, original long URL, creation date, visit statistics, and other metadata provided by Shlink.
If the node supports binary data output, it would relate to any downloadable content associated with the URLs, but based on the provided code and context, this node primarily outputs JSON data representing the list of short URLs.
Dependencies
- Requires connection to a Shlink server instance via its REST API.
- Needs an API authentication token credential configured in n8n to authorize requests.
- The base URL for API calls is dynamically constructed from the provided host credential, ensuring correct endpoint targeting.
Troubleshooting
Common issues:
- Incorrect or missing API credentials will cause authentication failures.
- Providing invalid page numbers (e.g., less than 1) may result in errors or empty responses.
- Network connectivity problems to the Shlink server can prevent successful API calls.
Error messages:
- Authentication errors typically indicate invalid or expired API tokens; verify and update credentials.
- Validation errors on pagination parameters suggest adjusting the "Page" and "Items / Page" inputs to valid values.
- Timeout or connection errors require checking network access and Shlink server availability.