Actions6
Overview
This node integrates with a URL shortening service API, allowing users to create shortened URLs and manage them programmatically. It is particularly useful for marketing campaigns, social media sharing, or any scenario where long URLs need to be condensed for easier distribution and tracking.
The "Encurtar URL" (Shorten URL) operation enables creating a short link from a long URL with options for customization such as custom aliases, password protection, expiration dates, meta tags, and targeting parameters. This helps in branding links, securing access, and tailoring user experience based on geography, device, or language.
Practical examples:
- A marketer shortens a campaign URL with a custom alias and sets an expiration date.
- A company creates branded short links using their own domain.
- A developer generates password-protected short URLs for sensitive content.
- A business tracks user engagement by adding pixel IDs to the shortened URL.
Properties
Name | Meaning |
---|---|
URL Longa | The original long URL you want to shorten. |
Alias Personalizado | Custom alias for the shortened URL to make it more memorable or branded. |
Tipo De Redirecionamento | Type of redirection for the shortened URL; options are: Direct, Frame, Splash. |
Senha | Password to protect the shortened URL, restricting access. |
Domínio Personalizado | Choose a custom domain from predefined options for the shortened URL. |
Data Para Expirar | Expiration date/time for the shortened URL (format example: "2021-09-28 23:11:16"). |
Título Meta | Meta title tag for the shortened URL page, useful for SEO and social sharing previews. |
Descrição Meta | Meta description tag for the shortened URL page. |
Imagem Meta | Link to a JPG or PNG image used as a meta image for social sharing previews. |
Geo Targeting | Geographic targeting data to customize redirect behavior based on user location. |
Device Targeting | Device targeting data to customize redirect behavior based on user device type. |
Language Targeting | Language targeting data to customize redirect behavior based on user language settings. |
Pixels | Array of pixel IDs for tracking user interactions and conversions through analytics platforms. |
Channel ID | Channel identifier associated with the shortened URL for campaign or source tracking. |
Deep Link | JSON object containing app store links for deep linking into mobile applications. |
Output
The node outputs JSON data representing the result of the URL shortening operation. This typically includes details about the newly created short URL such as:
- The shortened URL itself.
- Any metadata or customizations applied.
- Status or confirmation of creation.
If applicable, the output may also include tracking information or identifiers related to the shortened URL.
The node does not output binary data.
Dependencies
- Requires an active connection to the URL shortening service API.
- Needs an API authentication token or key configured in n8n credentials to authorize requests.
- No additional external dependencies beyond the API and n8n environment.
Troubleshooting
Common issues:
- Invalid or missing long URL input will cause the operation to fail.
- Using a custom alias that already exists may result in an error.
- Incorrectly formatted expiration dates can lead to rejection by the API.
- Missing or invalid API credentials will prevent successful communication with the service.
Error messages and resolutions:
- "Authentication failed": Verify that the API key or token is correctly set up in n8n credentials.
- "Alias already in use": Choose a different custom alias or leave blank for auto-generation.
- "Invalid URL format": Ensure the long URL is properly formatted including protocol (http/https).
- "Expiration date invalid": Use the correct date-time format as specified (e.g., "YYYY-MM-DD HH:mm:ss").
Links and References
- Refer to the URL shortening service's official API documentation for detailed parameter descriptions and usage guidelines.
- n8n documentation on credential setup and HTTP request nodes for integrating APIs.
- Best practices for URL shortening and link management in digital marketing contexts.