Actions108
- AI Actions
- Transcribe
- Detect Brand
- Extract Contact Information
- Mood Detection
- Detect Adult Content
- Enitity Detection
- Language Detection
- Too Long To Read
- Check Content Policy
- Detect Faces
- Generate Python Code
- Picture Text Recognition
- Detect Color
- Generate Image
- PDF OCR
- Translation
- Detect Email Type
- Generate Javascript Code
- Picture Object Recognition
- Business Actions
- Calculate Actions
- Code Actions
- Convert Actions
- Crypto Actions
- Date & Time Actions
- Generate Actions
- Image Actions
- Operator Actions
- PDF Actions
- Storage Actions
- Text Actions
- User Actions
Overview
This node provides a set of utilities under the "Generate" resource to manage shortened URLs. It supports operations such as creating a new shortened URL, deleting an existing one, updating the destination URL of a shortened link, and listing all shortened URLs associated with the user.
Common scenarios where this node is useful include:
- Automatically generating short links for long URLs to share in marketing campaigns or social media.
- Managing and updating existing short URLs without recreating them.
- Cleaning up unused or outdated short URLs by deleting them.
- Retrieving a list of all your shortened URLs for reporting or auditing purposes.
For example, you can use the "Add New Shortened Url" operation to create a custom short link pointing to a product page, then later update its destination if the product URL changes, or delete it when the campaign ends.
Properties
| Name | Meaning |
|---|---|
| Operation | The action to perform on shortened URLs: Add New Shortened Url, Delete Shortened Url, Update Shortened Url, List All Your Shortened Urls |
| Optional Custom Identifier | (Only for adding) A custom string to use as the identifier for the new shortened URL instead of a generated one |
| Delete a Shortened Url | (Required for delete and update) The identifier of the shortened URL to delete or update |
| Code Variables | (Advanced) Allows setting variables defined in a code editor context; used internally for dynamic scripting |
Output
The node outputs JSON data representing the result of the performed operation:
- For Add New Shortened Url, the output includes details of the newly created short URL, including its identifier and destination.
- For Delete Shortened Url, the output confirms deletion success or failure.
- For Update Shortened Url, the output shows the updated short URL information.
- For List All Your Shortened Urls, the output is an array of all shortened URLs with their identifiers and destinations.
No binary data output is involved in these operations.
Dependencies
- Requires an API key credential for authentication to the underlying service providing URL shortening functionality.
- The node makes HTTP POST requests to endpoints under the "generate/shortenedUrl" path with subpaths corresponding to the chosen operation.
- No additional external dependencies are required beyond the configured API access.
Troubleshooting
- Invalid Identifier Errors: When deleting or updating, ensure the provided identifier matches an existing shortened URL. Mistyped or non-existent identifiers will cause errors.
- Custom Identifier Conflicts: When adding a new shortened URL with a custom identifier, conflicts may occur if the identifier is already taken. Choose unique custom strings.
- Authentication Failures: Verify that the API key credential is correctly configured and has necessary permissions.
- Missing Required Parameters: Operations like add, delete, and update require specific parameters (e.g., destination URL for add/update, identifier for delete/update). Omitting these will cause errors.
- API Rate Limits: Excessive requests might be throttled by the service; handle such errors by retrying after some delay.
Links and References
- n8n Expressions Documentation — for using expressions in variable fields.
- General URL shortening concepts: https://en.wikipedia.org/wiki/URL_shortening