Dub.co link shortener n8n workflow
This n8n workflow creates short links with the Dub.co API and updates a link when the slug already exists. It is for marketers and developers who want branded short URLs generated from inside n8n as part of a bigger automation.
What it does
An API auth step holds the key, a CREATE request makes the link, and an If node checks whether the slug was available. If not, it retrieves the existing link and runs an UPDATE, then returns the shortened URL.
How to use it
Fill the required fields from the README table, starting with the Dub API key and the long URL, and run the test trigger.
Requirements and limits
Dub's API is capped at 10 requests per second per user.
More in Other and the n8n workflow library.
Full text
Front matter
name: dub.co URL Shortener
description: Triggered manually or by an app event. Connects Condition, HTTP request. ## Dub.co API Limits: Dub’s API is capped at 10 requests per second per user. ## Dub.co API **Create** Link. [Based on their API docs]({{ $env.API_BASE_URL }} ## Control Stack # README ## Dub.co API Workflow Configuration | Required | Input Field | Description | |----|---------|------------------| |✓| **`Dub API Key`** | _API Key for Dub.co integration._ | |✓| **`Long URL`**
category: Automation
kind: Workflow
software: Condition|HTTP requestdub.co URL Shortener
Triggered manually or by an app event. Connects Condition, HTTP request. ## Dub.co API Limits: Dub’s API is capped at 10 requests per second per user. ## Dub.co API Create Link. [Based on their API docs]({{ $env.API_BASE_URL }} ## Control Stack # README
Dub.co API Workflow Configuration
| Required | Input Field | Description |
|---|---|---|
| ✓ | Dub API Key | _API Key for Dub.co integration._ |
| ✓ | Long URL |
Steps
- Sticky Note1 (stickyNote)
- When clicking "Test Workflow" (manualTrigger)
- Sticky Note4 (stickyNote)
- Sticky Note5 (stickyNote)
- Sticky Note6 (stickyNote)
- API Auth (set)
- CREATE (httpRequest)
- IF Slug available (if)
- RETRIEVE (httpRequest)
- UPDATE (httpRequest)
- Shortened URL (set)
- Done (set)
Import
Download the JSON from the GitHub source and import it in n8n (Workflows, Import from file).
Source and license
Author: Zie619, n8n workflow collection. License: MIT.
Shown here with formatting for the web. Keep the author and license notice when you reuse it.
Related entries
- [n8n] Advanced URL Parsing and Shortening Workflow - Switchy.io Integration
- Httprequest Workflow: Notion, Code and Function
- Webhook Workflow: Slack, Google Sheets and HTTP request
- 🌐 Confluence Page AI Powered Chatbot
- Namesilo Bulk Domain Availability [Template]
- Manualtrigger Workflow: ChatGPT, Condition and HTTP request
There are more like this in the members library
The n8n workflow library holds 1,814 entries. Members can search all of them by meaning and read every one in full.