0-CodeKit icon

0-CodeKit

A toolbox of no-code utilities

Overview

This node provides a set of no-code utilities under the "0-CodeKit" collection. Specifically, for the Generate resource and the Shortened URL operation, it allows users to manage shortened URLs through various sub-operations: adding, deleting, updating, or listing their shortened URLs. This is useful in workflows where you need to programmatically create, update, remove, or retrieve short links, such as for marketing campaigns, analytics, or sharing compact URLs.

Practical examples:

  • Automatically generate a new shortened URL when a new record is added to your CRM.
  • Delete or update a previously created short link if its destination changes.
  • Retrieve a list of all your shortened URLs for reporting or auditing purposes.

Properties

Name Meaning
Operation The specific 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) 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 about the newly created shortened URL, including its identifier and destination.
  • Delete Shortened Url: Returns confirmation or status of the deletion.
  • Update Shortened Url: Returns updated information about the shortened URL.
  • List All Your Shortened Urls: Returns an array of all your shortened URLs, each with properties such as identifier, destination, and possibly creation date.

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 codeKitApi credential in n8n for authentication.

Troubleshooting

Common issues:

  • Missing or invalid credentials: If the codeKitApi credential is not set up correctly, requests will fail.
  • Invalid identifier: Trying to delete or update a non-existent identifier will result in an error.
  • Duplicate custom identifier: When adding a new shortened URL with a custom identifier that already exists, the operation may fail.

Error messages and resolutions:

  • "error":"Request failed with status code 401" – Check your API key configuration.
  • "error":"Identifier not found" – Ensure the identifier provided exists.
  • "error":"Custom identifier already in use" – Choose a different custom identifier.

Links and References

Discussion