New260+ blocks and 240+ tools are now fully documented
DocumentationReferenceTool IntegrationsMarketing & Outreach
Tool

Dub

Create and manage short links and track analytics with Dub.co

Create, retrieve, update, and delete short links in Dub.co, and pull click, lead, and sales analytics. Use this integration when workflows need to generate branded or trackable short URLs, modify existing links, or report on link performance.

Overview

PropertyValue
Typedub
CategoryTool — Link Management
AuthAPI Key (Bearer token)

Operations

OperationTool IDDescription
Create Linkdub_create_linkCreate a new short link with optional custom domain, slug, UTM parameters, expiry, and password
Get Linkdub_get_linkRetrieve details for a link by its ID, external ID, or domain + slug combination
Update Linkdub_update_linkModify an existing short link's destination URL, metadata, UTM params, or status
Delete Linkdub_delete_linkPermanently delete a short link by its link ID or external ID
List Linksdub_list_linksRetrieve a paginated, filterable list of all short links in the workspace
Get Analyticsdub_get_analyticsFetch click, lead, and sales analytics with optional grouping by time, country, device, and more

Configuration

SettingTypeRequiredDescription
apiKeystring (secret)Yes (all operations)Your Dub API key — stored as a secret; use {{DUB_API_KEY}}
urlstringYes (Create Link); No (Update Link)The destination URL the short link points to
linkIdstringYes (Update Link, Delete Link); No (Get Link)The link ID returned by Dub, or an external ID prefixed with ext_
externalIdstringNoYour own database ID for the link; prefix with ext_ when used as linkId
domainstringNoCustom short-link domain (defaults to dub.sh); use together with key when looking up a link
keystringNoCustom slug for the short link; randomly generated if not provided on creation
tagIdsstringNoComma-separated tag IDs to assign or filter by
commentsstringNoInternal notes for the link
expiresAtstringNoLink expiration date in ISO 8601 format (e.g. 2026-12-31T23:59:59Z)
passwordstringNoPassword to protect the link
rewritebooleanNoEnable link cloaking so the destination URL is hidden from visitors
archivedbooleanNoMark the link as archived
titlestringNoCustom Open Graph title shown when the link is shared
descriptionstringNoCustom Open Graph description shown when the link is shared
utm_sourcestringNoUTM source parameter appended to the destination URL
utm_mediumstringNoUTM medium parameter
utm_campaignstringNoUTM campaign parameter
utm_termstringNoUTM term parameter
utm_contentstringNoUTM content parameter
searchstringNo(List Links) Search query matched against the slug and destination URL
showArchivedbooleanNo(List Links) Include archived links in results; defaults to false
sortBystringNo(List Links) Sort field: createdAt, clicks, saleAmount, or lastClicked
sortOrderstringNo(List Links) Sort direction: asc or desc
pagenumberNo(List Links) Page number; defaults to 1
pageSizenumberNo(List Links) Results per page; defaults to 100, maximum 100
eventstringNo(Get Analytics) Event type: clicks (default), leads, sales, or composite
groupBystringNo(Get Analytics) Group results by: count (default), timeseries, countries, cities, devices, browsers, os, referers, top_links, or top_urls
intervalstringNo(Get Analytics) Preset time window: 24h (default), 7d, 30d, 90d, 1y, mtd, qtd, ytd, or all
startstringNo(Get Analytics) Custom start date/time in ISO 8601 format; overrides interval
endstringNo(Get Analytics) Custom end date/time in ISO 8601 format; defaults to now
countrystringNo(Get Analytics) Filter by country using ISO 3166-1 alpha-2 code (e.g. US)
timezonestringNo(Get Analytics) IANA timezone for timeseries data (e.g. America/New_York); defaults to UTC

Outputs

FieldTypeDescription
idstringUnique Dub ID of the link
domainstringShort-link domain
keystringSlug portion of the short link
urlstringDestination URL
shortLinkstringFull short link URL (e.g. https://dub.sh/my-link)
qrCodestringURL pointing to the auto-generated QR code for the link
archivedbooleanWhether the link is archived
externalIdstringYour external database ID (optional)
titlestringCustom OG title (optional)
descriptionstringCustom OG description (optional)
tagsjsonArray of tag objects (id, name, color)
clicksnumberTotal number of clicks recorded
leadsnumberTotal number of leads recorded
salesnumberTotal number of sales recorded
saleAmountnumberTotal sale amount in cents
lastClickedstringISO 8601 timestamp of the most recent click (optional)
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 last-updated timestamp
utm_sourcestringUTM source parameter (optional)
utm_mediumstringUTM medium parameter (optional)
utm_campaignstringUTM campaign parameter (optional)
utm_termstringUTM term parameter (optional)
utm_contentstringUTM content parameter (optional)
FieldTypeDescription
idstringID of the deleted link
FieldTypeDescription
linksjsonArray of link objects; each object contains id, domain, key, url, shortLink, qrCode, archived, externalId, title, description, clicks, leads, sales, saleAmount, lastClicked, createdAt, updatedAt, tags, and UTM fields
countnumberNumber of links returned in this response

Get Analytics

FieldTypeDescription
clicksnumberTotal click count (when groupBy is count or omitted)
leadsnumberTotal lead count
salesnumberTotal sales count
saleAmountnumberTotal sale amount in cents
datajsonGrouped analytics array when groupBy is set to a dimension (e.g. timeseries, countries, devices); null when returning aggregated counts

Example

[Starter] → [Dub: Create Link] → [Agent: use the result]

When a new campaign is launched, the Starter block provides the long destination URL as {{starter.destinationUrl}}. The Dub block is configured with {{DUB_API_KEY}}, sets utm_campaign to {{starter.campaignName}}, and utm_medium to email. The resulting {{dub.shortLink}} is passed to a downstream Agent block that composes an outreach message including the branded short URL. A second Dub block later in the workflow calls Get Analytics with linkId set to {{dub.id}} and interval set to 7d so the Agent can report on click performance.

Tips

  • Store your Dub API key as an environment secret and reference it with {{DUB_API_KEY}} — never paste it directly into a block field.
  • When looking up a link by domain and slug (Get Link), provide both domain and key together; omitting either will cause the lookup to fall back to the linkId parameter.
  • To reference a link using your own system's identifier, set externalId on creation, then pass it prefixed with ext_ as the linkId in Update, Delete, and Get operations (e.g. ext_{{yourSystem.recordId}}).
  • Use Get Analytics with groupBy set to timeseries and interval set to 7d to feed daily click trends into an Agent that generates a weekly performance summary.