dub.co URL Shortener

For dub.co, this automated URL shortener workflow simplifies link management by allowing users to quickly create and update shortened URLs with custom slugs. It integrates seamlessly with the Dub API, ensuring efficient handling of requests while adhering to API limits. Users can effortlessly input their API key and long URL, resulting in a streamlined process that saves time and enhances productivity.

7/8/2025
12 nodes
Medium
manualmediumsticky noteadvancedapiintegrationlogicconditional
Categories:
Manual TriggeredMedium Workflow
Integrations:
Sticky Note

Target Audience

  • Marketers looking to shorten URLs for campaigns and track link performance.
    - Developers who need to automate URL shortening in applications.
    - Business Owners wanting to create branded short links for better customer engagement.
    - Content Creators needing shortened links for social media sharing and analytics.
    - Teams managing multiple projects requiring consistent URL management.
  • Problem Solved

    This workflow automates the process of shortening URLs using the Dub.co API, addressing the need for quick and efficient link management. It allows users to:
    - Generate short links effortlessly without manual intervention.
    - Retrieve information about the shortened links, including their IDs, for further processing.
    - Handle potential errors in slug availability, ensuring a smooth user experience.

    Workflow Steps

  • Trigger: The workflow begins when the user clicks the "Test Workflow" button, initiating the process.
    - API Authentication: The API Auth node collects necessary credentials, including the Dub API Key, Long URL, Project Slug, and optional fields like Custom Slug and Custom Domain.
    - Link Creation: The CREATE node sends a POST request to the Dub.co API to create a new shortened link, using the parameters provided in the previous step.
    - Slug Availability Check: The IF Slug available node checks if the response status code is 200, indicating success.
    - Link Retrieval: If the slug is not available, the RETRIEVE node requests information about the newly created link using the provided parameters.
    - Link Update: The UPDATE node updates the link information if necessary, ensuring the link is correctly configured.
    - Output: The Shortened URL node extracts the shortened link from the response and prepares it for final output.
    - Completion: The Done node signifies the end of the workflow, indicating successful execution.
  • Customization Guide

  • Users can customize the workflow by modifying the API Auth node to include their own Dub API Key and other parameters relevant to their project.
    - To change the Long URL that needs to be shortened, simply update the Long URL field in the API Auth node.
    - For unique short links, users can specify a Custom Slug that reflects their branding or content.
    - Users can adapt the workflow to include additional error handling or notifications by adding new nodes or modifying existing ones.
    - To manage multiple projects, users can adjust the Project Slug field accordingly, ensuring the workflow fits their specific needs.