Actions40
- AI Actions
- Business Actions
- Calculate Actions
- Code Actions
- Convert Actions
- Crypto Actions
- Generate Actions
- Operator Actions
- PDF Actions
- Storage Actions
Generate → Shortened URL
AI-generatedOverview
This node provides a set of no-code utilities, and specifically for the Generate resource with the Shortened URL operation, it allows users to manage shortened URLs. The supported actions include adding new shortened URLs, deleting existing ones, updating destinations, and listing all your shortened URLs. This is useful in scenarios where you need to programmatically create, update, or manage short links within your n8n workflows, such as for marketing campaigns, analytics tracking, or simplifying long URLs.
Practical examples:
- Automatically generate a short link for each new record in a database.
- Update the destination of a previously created short link when content moves.
- Delete expired or unused short links.
- Retrieve a list of all your active short links for reporting.
Properties
| Name | Meaning |
|---|---|
| Operation | Selects 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 | (Add only) Specify a custom identifier for the new shortened URL. |
| Delete a Shortened Url | (Delete/Update only) The identifier of the shortened URL to delete or update. |
| Identifier | (Update only) Identifier of the shortened URL you want to edit or delete. |
Output
The output will be a JSON object or an array of objects depending on the operation:
- Add New Shortened Url: Returns details of the newly created shortened URL, including its identifier and destination.
- Delete Shortened Url: Returns confirmation of deletion, typically including the identifier of the deleted URL.
- Update Shortened Url: Returns updated details of the shortened URL.
- List All Your Shortened Urls: Returns an array of all your shortened URLs, each with properties such as identifier and destination.
Example output for "Add New Shortened Url":
{
"identifier": "custom123",
"destination": "https://example.com",
"shortUrl": "https://short.ly/custom123"
}
Example output for "List All Your Shortened Urls":
[
{
"identifier": "custom123",
"destination": "https://example.com",
"shortUrl": "https://short.ly/custom123"
},
{
"identifier": "abc456",
"destination": "https://another.com",
"shortUrl": "https://short.ly/abc456"
}
]
Dependencies
- External Service: Requires access to the CodeKit API for URL shortening operations.
- API Key: You must configure the
codeKitApicredential in n8n for authentication.
Troubleshooting
Common issues:
- Missing or invalid API key: Ensure the
codeKitApicredential is correctly set up in n8n. - Invalid identifier: When deleting or updating, make sure the identifier exists; otherwise, you may receive an error indicating the URL was not found.
- Custom identifier already in use: If adding a new shortened URL with a custom identifier that already exists, the API may return an error about duplicate identifiers.
Error messages and resolutions:
"error":"Invalid API key"– Check your credentials configuration."error":"Identifier not found"– Verify the identifier provided for delete/update operations."error":"Custom identifier already exists"– Choose a different custom identifier or leave it blank for auto-generation.
Links and References
- n8n Documentation
- CodeKit API Documentation (Replace with actual documentation link if available)