Actions12
- Short URL Actions
- Tag Actions
- Visit Actions
- Domain Actions
Overview
This node integrates with the Shlink URL Shortener API, allowing users to manage short URLs programmatically within n8n workflows. Specifically, the Delete operation under the Short URL resource enables users to delete a short URL by specifying its short code.
Common scenarios where this node is beneficial include:
- Automating cleanup of outdated or invalid short URLs.
- Managing URL lifecycle in bulk workflows.
- Integrating URL management into larger automation pipelines (e.g., deleting URLs after campaigns end).
Practical example:
- After a marketing campaign finishes, automatically delete all associated short URLs by iterating over their short codes and using this node’s Delete operation.
Properties
| Name | Meaning |
|---|---|
| Short Code | The unique short code identifier of the URL to be deleted. This is required to specify which short URL should be removed. |
Output
The output JSON contains the response from the Shlink API after attempting to delete the specified short URL. Typically, for a successful deletion, the API returns an empty object or confirmation data indicating the URL was deleted.
- The
jsonoutput field will contain the API response as a JSON object. - No binary data is output by this operation.
Example output JSON on success might look like:
{}
or some confirmation structure depending on the API response.
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 uses HTTP DELETE requests to the endpoint
/rest/v3/short-urls/{shortCode}.
Troubleshooting
Common Issues
- Invalid or missing short code: If the short code parameter is empty or incorrect, the API will return an error indicating the URL was not found.
- Authentication errors: Missing or invalid API key or base URL will cause authentication failures.
- Network issues: Connectivity problems to the Shlink server will result in request failures.
- Permission issues: The API key used may lack permissions to delete URLs.
Error Messages and Resolutions
- 404 Not Found: The short code does not exist. Verify the short code is correct.
- 401 Unauthorized / 403 Forbidden: Check that the API key credential is valid and has sufficient permissions.
- Request failed:
: General network or API error; check connectivity and API status. - Response status and data logged: The node logs detailed error responses to help diagnose issues.
To resolve errors:
- Confirm the short code exists in Shlink.
- Verify API credentials and base URL configuration.
- Ensure the Shlink server is reachable.
- Review API permissions for the key used.
Links and References
- Shlink API Documentation – Official API reference for endpoints and parameters.
- Shlink URL Shortener – Project homepage and documentation.
- n8n Documentation – For general guidance on using credentials and HTTP request nodes.