Actions5
- 🔗 Short Actions
- 📈 Insight Actions
Overview
This node creates a short link using a URL shortening service. It is useful for generating concise, shareable URLs that redirect to longer destination URLs. Common scenarios include marketing campaigns, social media sharing, or tracking clicks on links. For example, you can create a short link that redirects users to a product page, while optionally customizing the link’s route, title, description, and preview image.
Properties
| Name | Meaning |
|---|---|
| Additional Body Fields | Optional fields to customize the short link: |
| - Route | The custom path segment of the short link (e.g., "promo2024"). |
| - Destination | The target URL where the short link will redirect. |
| - Title | Title text shown in link previews (e.g., social media cards). |
| - Description | Description text shown in link previews. |
| - Image | URL of an image displayed in link previews. |
| - Favicon | URL of the favicon shown in browsers during redirects. |
| - Consent | Boolean flag to request visitor consent before storing cookies. |
| - Clicks | Integer representing the click count (can be used to initialize or update). |
| - Created At | Date/time string indicating when the link was created (UTC+0). |
| - Updated At | Date/time string indicating when the link was last updated (UTC+0), including click updates. |
Output
The node outputs JSON data representing the created short link object returned by the API. This typically includes the short link URL, its properties (route, destination, title, etc.), and metadata such as creation and update timestamps. There is no binary output.
Dependencies
- Requires an API key credential for authenticating with the URL shortening service.
- The node sends HTTP requests to the service’s API endpoint to create the short link.
- No additional environment variables are explicitly required beyond the API authentication.
Troubleshooting
- Invalid or missing destination URL: Ensure the destination property is a valid URL; otherwise, the API may reject the request.
- Authentication errors: Verify that the API key credential is correctly configured and has necessary permissions.
- Route conflicts: If specifying a custom route, it must be unique; otherwise, the API may return an error about duplicate routes.
- Date format issues: Created At and Updated At should be valid date strings in UTC+0 format; invalid formats might cause API errors.
- Consent flag misuse: The consent field expects a boolean; passing other types may lead to unexpected behavior.
Links and References
- Refer to the URL shortening service’s official API documentation for detailed information on supported fields and response structure.
- n8n documentation on creating and using credentials for API authentication.