npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gladiator1st/n8n-nodes-dub

v1.0.8

Published

n8n community node for Dub.co - Modern Short Links, Click Analytics, Custom QR Codes & AI Agent Tools

Readme

@gladiator1st/n8n-nodes-dub

n8n Community Node npm version npm downloads License: MIT

Community node for Dub.co — the modern, open-source link management platform. Create branded short links, generate customized high-resolution QR codes, track real-time click and conversion analytics, and connect directly with LangChain AI Agents using dynamic tools!


⚡ Superpowers Included

                      ┌─────────────────────────────────────────────────────┐
                      │          @gladiator1st/n8n-nodes-dub                │
                      └──────────────────────────┬──────────────────────────┘
                                                 │
        ┌──────────────────────────────┬─────────┴─────────┬──────────────────────────────┐
        ▼                              ▼                   ▼                              ▼
 🔗 Link Operations             📱 QR Codes         📊 Real-Time Analytics          🏷️ Tags & Domains
 • Create (Branded Slugs)       • Generate Custom   • Clicks, Leads & Sales         • Create & List Tags
 • Get & List Many Links          Resolution QRs    • Group by Country, City,       • View Verified Workspace
 • Update Destination URL                             Device, Browser & Referrers     Custom Domains
 • Delete Links by ID

📦 Key Capabilities

  • 🔗 Branded Short Links: Create, update, retrieve, list, and delete custom branded short links on dub.sh or your verified custom domains.
  • 📱 Dynamic QR Code Generation: Instantly generate customizable high-resolution QR codes for marketing flyers, campaigns, or social posts.
  • 📊 Granular Analytics & Attribution: Query click counts, conversion leads, and sales broken down by country, city, device, browser, referrer, or hourly/daily timeseries.
  • 🏷️ Campaign Organization: Tag and categorize links dynamically across marketing channels.
  • 🤖 Autonomous AI Agent Tool (usableAsTool: true): Connect directly into LangChain AI Agents or Tools Agents in n8n so AI assistants can shorten links and output QR codes dynamically during conversation.

🚀 Installation

In n8n UI (Community Nodes)

  1. In your n8n instance, go to Settings ➔ Community Nodes.
  2. Click Install a community node.
  3. Enter:
    @gladiator1st/n8n-nodes-dub
  4. Confirm the installation terms and click Install.

🔑 Credentials Setup

  1. Sign up or log into your Dub.co Dashboard.
  2. Navigate to Settings ➔ API Keys and generate a new API key.
  3. In n8n, create a new credential for Dub.co API and paste your API key.

📖 Step-by-Step Usage Examples

Example 1: Create a Custom Branded Short Link

This workflow demonstrates how to generate a custom branded short link from a long URL (e.g. from an RSS feed, webhook trigger, or blog post).

┌──────────────────────────────┐
│ Webhook / Form Trigger       │ ➔ Long URL: "https://example.com/blog/how-to-scale-ai-agents"
└──────────────┬───────────────┘
               │
               ▼
┌──────────────────────────────┐
│ Dub.co (Resource: Link)      │ ➔ Resource: Link | Operation: Create
└──────────────┬───────────────┘   Slug: "ai-agents" | Domain: "dub.sh"
               │
               ▼
┌──────────────────────────────┐
│ Output: Branded Short Link   │ ➔ Returns "https://dub.sh/ai-agents" & tracking metadata
└──────────────────────────────┘

Node Parameters:

  • Resource: Link
  • Operation: Create
  • Destination URL: https://example.com/blog/how-to-scale-ai-agents
  • Short Key / Slug: ai-agents (leave blank for a randomly generated slug)
  • Custom Domain: dub.sh (or select your custom verified domain)

Sample Output Returned by the Node:

{
  "id": "clk_01j7abc123def456ghi",
  "domain": "dub.sh",
  "key": "ai-agents",
  "url": "https://example.com/blog/how-to-scale-ai-agents",
  "shortLink": "https://dub.sh/ai-agents",
  "qrCode": "https://api.dub.co/qr?url=https://dub.sh/ai-agents",
  "clicks": 0,
  "leads": 0,
  "sales": 0,
  "createdAt": "2026-09-04T12:00:00.000Z",
  "updatedAt": "2026-09-04T12:00:00.000Z"
}

Example 2: Retrieve Link Click Analytics & Geographic Insights

Query real-time click and conversion statistics for a specific link or across your entire workspace, grouped by geographic country or referrer.

┌──────────────────────────────┐
│ Daily Schedule Trigger       │ ➔ Runs every morning at 9:00 AM
└──────────────┬───────────────┘
               │
               ▼
┌──────────────────────────────┐
│ Dub.co (Analytics)           │ ➔ Resource: Analytics | Operation: Get Clicks Analytics
└──────────────┬───────────────┘   Group By: Countries | Interval: Last 7 Days
               │
               ▼
┌──────────────────────────────┐
│ Slack / Email Notification   │ ➔ Sends daily geographic engagement summary
└──────────────────────────────┘

Node Parameters:

  • Resource: Analytics
  • Operation: Get Clicks Analytics
  • Event Type: Clicks
  • Group By: Countries
  • Interval: Last 7 Days
  • Filter by Link ID: clk_01j7abc123def456ghi (optional, leave empty for workspace-wide aggregate)

Sample Output Returned by the Node:

[
  {
    "country": "US",
    "city": "Wildwood",
    "clicks": 1420
  },
  {
    "country": "GB",
    "city": "London",
    "clicks": 532
  },
  {
    "country": "DE",
    "city": "Frankfurt",
    "clicks": 310
  }
]

Example 3: Generate Dynamic High-Resolution QR Codes

Generate a high-resolution QR code image for print media, event badges, or marketing campaigns.

┌──────────────────────────────┐
│ Campaign Trigger             │ ➔ Campaign Link: "https://dub.sh/ai-agents"
└──────────────┬───────────────┘
               │
               ▼
┌──────────────────────────────┐
│ Dub.co (Resource: QR Code)   │ ➔ Resource: QR Code | Operation: Generate
└──────────────┬───────────────┘   URL: "https://dub.sh/ai-agents" | Size: 600px
               │
               ▼
┌──────────────────────────────┐
│ Output: QR Image URL / SVG   │ ➔ Send via email or attach to customer receipt
└──────────────────────────────┘

Node Parameters:

  • Resource: QR Code
  • Operation: Generate
  • QR Code URL: https://dub.sh/ai-agents
  • Size (Pixels): 600

Sample Output Returned by the Node:

{
  "url": "https://api.dub.co/qr?url=https://dub.sh/ai-agents&size=600",
  "status": 200,
  "contentType": "image/png"
}

Example 4: Autonomous AI Agent Integration (usableAsTool: true)

Attach the Dub.co node directly to an AI Agent (e.g. OpenAI or Gemini) in n8n. The AI agent will autonomously decide when to shorten long URLs or provide QR codes during conversational user chats.

┌──────────────────────────────┐       ┌────────────────────────────┐
│ AI Agent (OpenAI / Gemini)   │ ◄──── │ Dub.co Node as Tool        │
└──────────────┬───────────────┘       └────────────────────────────┘
               │
               ▼
┌──────────────────────────────┐
│ "Here is your branded link:  │ ➔ The agent dynamically invoked Dub.co
│  https://dub.sh/ai-agents"   │   and returned the short URL to the user!
└──────────────────────────────┘

🛠️ Operations & Parameters Reference

| Resource | Operation | Description | Required Parameters | | :--- | :--- | :--- | :--- | | Link | Create | Create a new branded short link | Destination URL | | Link | Get | Retrieve details and metadata for a specific link | Link ID | | Link | Get Many | List many short links in the workspace | — (Optional Custom Domain, Limit) | | Link | Update | Update the destination URL of an existing short link | Link ID, New Destination URL | | Link | Delete | Permanently delete a short link by ID | Link ID | | QR Code | Generate | Generate a customized high-resolution QR code image | QR Code URL | | Analytics | Get Clicks Analytics | Retrieve real-time click and conversion analytics | — (Optional Event Type, Group By, Interval, Link ID) | | Tag | Create | Create a new colored organization tag | Tag Name, Tag Color | | Tag | Get Many | List all tags configured in the workspace | — | | Domain | Get Many | List all verified custom domains in the workspace | — |


👨‍💻 Author

Muhammad Qasim


📄 License

MIT © Muhammad Qasim