Actions40
- AI Actions
- Business Actions
- Calculate Actions
- Code Actions
- Convert Actions
- Crypto Actions
- Generate Actions
- Operator Actions
- PDF Actions
- Storage Actions
Operator → Expand URL
AI-generatedOverview
The Expand URL operation under the Operator resource in this custom n8n node is designed to take a shortened or redirected URL and return its fully expanded destination URL. This is useful in scenarios where you need to resolve the final target of a link, such as unshortening URLs from services like bit.ly, tinyurl, etc., for analytics, security checks, or data enrichment.
Practical examples:
- Unshorten links in marketing emails to analyze their true destinations.
- Check the safety of user-submitted URLs by expanding them before further processing.
- Enrich datasets with the final URLs for reporting or compliance purposes.
Properties
| Name | Meaning |
|---|---|
| Expand an Url | The URL to be expanded. This should be a shortened or redirecting URL (string, required). |
Output
The output will be a JSON object containing the result of the URL expansion. While the exact structure depends on the API response, typically you can expect fields such as:
{
"expandedUrl": "https://final-destination.com/page",
// ...possibly other metadata depending on the service
}
If an error occurs and "Continue On Fail" is enabled, the output may include:
{
"error": "Error message string"
}
Dependencies
- External Service: Requires access to the CodeKit API endpoint for URL expansion.
- Credentials: You must configure the
codeKitApicredential in n8n for authentication.
Troubleshooting
Common issues:
- Invalid or Malformed URL: If the input URL is not valid, the node may throw an error or return an error message in the output.
- API Key Missing/Invalid: If the
codeKitApicredential is not set up correctly, requests will fail. - Network Issues: Connectivity problems between n8n and the CodeKit API can cause failures.
- Unsupported URL Shortener: Some obscure or private shorteners may not be supported by the underlying service.
Error messages:
"error": "Request failed with status code 401"– Check your API credentials."error": "Invalid URL format"– Ensure the input is a properly formatted URL."error": "Service unavailable"– The external API may be down; try again later.
Links and References
- n8n Documentation: Custom Nodes
- URL Expander Use Cases (external example tool)
- CodeKit API Documentation (replace with actual documentation if available)