Actions6
Overview
This node integrates with the Short.io service to create and manage shortened URLs. Specifically, the "Create Link" operation under the "Links" resource allows users to generate a new short link from an original long URL, optionally customizing various aspects of the link such as expiration, redirection behavior, and tracking parameters.
Common scenarios for this node include:
- Marketing campaigns where you want to share concise, trackable URLs.
- Redirecting users based on device type (iPhone or Android).
- Protecting links with passwords or setting expiration dates.
- Managing branded short links with custom paths.
For example, a user can input a long URL and specify a custom path and expiration date to generate a branded short link that expires after a certain time, helping control access and track campaign effectiveness.
Properties
| Name | Meaning |
|---|---|
| Original Long URL | The full original URL that you want to shorten. Example: https://iAmALongURL.com |
| Additional Fields | A collection of optional settings to customize the created short link: |
| - Path | Custom path segment for the short link (e.g., 6fzQYy). |
| - Allow Duplicates | Boolean flag indicating if multiple short links can be created for the same original URL. |
| - Title | A title shown in the Short.io admin panel for easier identification of the link. |
| - Expires At | Unix timestamp (milliseconds) when the link will expire and stop working. |
| - Expired URL | URL to redirect users to when the link has expired. |
| - iphone URL | Redirect URL specifically for users opening the link on iPhone devices. |
| - Android URL | Redirect URL specifically for users opening the link on Android devices. |
| - Cloaking | Boolean flag to cloak the link so the browser address bar does not show the original URL during redirection. |
| - Redirect Type | HTTP redirect status code to use (options: 301, 302, 303, 307, 308). Default is 302. |
| - Password | Password required to access the link (requires a paid plan). The password is securely hashed and not stored in plain text. |
| - Deletes At (TTL) | Unix timestamp (milliseconds) when the link will be deleted permanently. Unlike expiration, deletion removes the link from account limits. Must be at least one week in the future. |
| - UTM Source | Referrer source for tracking (e.g., google, newsletter). |
| - UTM Medium | Marketing medium for tracking (e.g., cpc, banner, email). |
| - UTM Campaign | Campaign name or promo code for tracking (e.g., spring_sale). |
| - UTM Term | Paid keywords identifier for tracking. |
| - UTM Content | Used to differentiate ads or content variations. |
| - Tags | Multiple tags to categorize or label the link. Each tag is a string value. |
Output
The node outputs JSON data under the field shortIoResponse containing the response from the Short.io API for the created link. This typically includes details about the newly created short link such as its ID, short URL, original URL, expiration info, and any other metadata returned by the API.
No binary data output is produced by this operation.
Example output snippet (simplified):
{
"shortIoResponse": {
"id": "abc123",
"shortURL": "https://short.io/6fzQYy",
"originalURL": "https://iAmALongURL.com",
"expiresAt": 1714442044236,
"title": "Short Link From n8n",
"tags": ["marketing", "campaign"]
}
}
Dependencies
- Requires an active Short.io account and an API key credential configured in n8n for authentication.
- The node makes HTTP requests to the Short.io API endpoint
https://api.short.io/api. - Proper permissions on the API key are needed to create and manage links.
Troubleshooting
- Invalid or missing API credentials: Ensure the API key credential is correctly set up in n8n and has sufficient permissions.
- Invalid URL format: The original URL must be a valid URL; otherwise, the API may reject the request.
- Expiration or deletion timestamps: Make sure the Unix timestamps for expiration (
expiresAt) and deletion (ttl) are valid and logical (e.g., deletion must be at least one week in the future). - Password protection requires a paid plan: Attempting to set a password without the appropriate plan may cause errors.
- Duplicate path conflicts: If
allowDuplicatesis false and the path already exists, the API may return an error. - Network or API errors: Check connectivity and Short.io service status if requests fail unexpectedly.
Error messages from the API are passed through and should be reviewed to adjust parameters accordingly.
