Shlink icon

Shlink

Interact with Shlink URL Shortener API

Actions12

Overview

This node integrates with the Shlink URL Shortener API to retrieve visit data associated with a specific domain. The "Get by Domain" operation fetches visits made to all short URLs under the specified domain, optionally filtered by date range and limited in number or returned fully.

Common scenarios where this node is useful include:

  • Analyzing traffic and user engagement for all shortened URLs under a particular domain.
  • Monitoring visit trends over time by applying start and end date filters.
  • Exporting visit data for reporting or further processing in workflows.

For example, you could use this node to get all visits to your branded short URLs on "example.com" during the last month to understand user behavior and campaign effectiveness.

Properties

Name Meaning
Domain The domain to get visits for (e.g., "example.com").
Return All Whether to return all visit records or only up to a given limit.
Limit Maximum number of visit records to return if not returning all (minimum 1).
Additional Fields Optional filters:
• Start Date — Filter visits after this date.
• End Date — Filter visits before this date.

Output

The node outputs an array of visit objects in the json field. Each object represents a single visit record retrieved from the Shlink API for the specified domain. The exact structure of each visit object depends on the Shlink API response but typically includes details such as visit timestamp, referrer, user agent, and other metadata about the visit.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the Shlink URL Shortener API.
  • Needs an API key credential configured in n8n to authenticate requests.
  • The base URL of the Shlink instance must be provided in the credentials.
  • The node makes HTTP GET requests to endpoints like /rest/v3/domains/{domain}/visits.

Troubleshooting

  • Common issues:

    • Invalid or missing domain parameter will cause the API request to fail.
    • Incorrect or missing API authentication credentials will result in authorization errors.
    • Network connectivity problems can prevent successful API calls.
    • If the base URL does not start with http:// or https://, the node automatically prepends https://. Ensure the base URL is correct.
  • Error messages:

    • API request failures will log error messages including HTTP status codes and response data when available.
    • Common HTTP errors include 401 Unauthorized (check API key), 404 Not Found (invalid domain), and 429 Too Many Requests (rate limiting).
  • Resolution tips:

    • Verify that the domain exists and is correctly spelled.
    • Confirm API key validity and permissions.
    • Check network access to the Shlink server.
    • Use the "Return All" option carefully to avoid large data loads that may impact performance.

Links and References

Discussion