Resources · n8n integration

Yourls n8n integrationAutomate Yourls with n8n.

Your short links live on your own server, and n8n can drive them. The Yourls node exposes 3 operations on a single URL resource: shorten, expand, and pull the stats of one short link. No trigger node exists, so another node starts the run. The Yourls n8n integration fits teams that keep link data in house.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the Yourls n8n integration actually do?

Yourls runs on a server you control, and the n8n node talks to that instance through its API. The integration turns link handling into a step inside a workflow: a long address comes in, a short one goes out, and the workflow keeps moving. It works the other way round too, resolving a short link back to its destination or reading the stats your instance stores for it.

The node covers one resource, URL, with 3 operations. That is a small surface, and it is the point: link shortening is rarely the goal of a workflow, it is a step inside one. The depth comes from what sits around it.

First scenario, campaign links that build themselves. A marketing sheet holds the raw destinations, a Google Sheets node reads the new rows, url.shorten creates a short link for each one, and the result goes back into the sheet and into a Slack channel. Nobody opens the Yourls admin.

Second scenario, outbound email that tracks itself. Before a Gmail node sends, the workflow shortens each link with url.shorten, optionally setting a Keyword from the Additional Fields collection. Third scenario, a weekly report: a Schedule Trigger fires, url.stats runs over a list of short links, and the numbers land in a sheet. The public n8n template 815 shows the pair, creating a short URL and then reading its stats in the same run.

Reach for the HTTP Request node when you need something the 3 operations do not cover, such as listing every link in the database or deleting one. It calls any Yourls API endpoint and reuses the same credential through predefined authentication, so you do not build a second connection.

Two limits worth knowing before you start. There is no Yourls trigger node, so nothing in a workflow reacts to a click on its own; the workflow has to be started by a Schedule Trigger, an n8n Webhook, or another tool's trigger. And the instance has to exist first, installed on your server, which is the trade compared with a hosted shortener like Bitly. If you are weighing that trade for a whole stack of automations, the n8n review goes through it in detail.

Connect

How do you connect n8n to your Yourls instance?

  1. 01

    Install Yourls on your server

    Yourls is self-hosted software, so the first step happens outside n8n: the instance has to be installed on a server you own before any credential can point at it. Once it answers on its own domain, note that address, because n8n asks for it by name in the next step. This is also what makes the integration attractive to teams that cannot send link data to a third party.

  2. 02

    Get your Signature token

    In your Yourls admin, open Tools, then Secure passwordless API call. The page gives you a Signature token, the string n8n sends instead of a password. Copy it straight from that screen. Yourls documents the mechanism under its passwordless API guide, and the token belongs to the account that generated it, so create it from the user you want the automations to act as.

  3. 03

    Create the credential in n8n

    In n8n, open the Credentials menu and add a Yourls API key credential. It asks for two things: the Signature token you just copied, and the URL of your Yourls instance. A credential is created once and reused by every workflow, so the Yourls node picks it from a dropdown afterwards and you never paste the token into a node again.

Actions

What can the Yourls node do?

The Yourls node exposes 3 operations across 1 resources. For each one: the node as you configure it in n8n, the required fields, and our field notes.

Resources × operations matrix
ResourceExpandShortenStats
URL✓✓✓

URL

3 operations
01

Expand a URL

url.expand

What you see in n8n

Notes & use cases

Takes a short link and returns the long address behind it, so the rest of the workflow can read the real destination before acting on it.

Key parameters

  • Short URL: the short link to resolve, pasted in full or pulled from the incoming item with an expression such as {{ $json.shortUrl }} when a previous node supplies it.
Use cases
a support inbox receives a ticket containing a Yourls link, and the workflow resolves it first so the routing rules match on the destination instead of on a short code nobody can read.
02

Shorten a URL

url.shorten

What you see in n8n

Notes & use cases

Sends a long address to your instance and gets the short version back, ready to drop into a message, a spreadsheet cell or an email body.

Key parameters

  • URL: the long address to shorten, usually an expression like {{ $json.url }} carrying the link built earlier in the run.
  • Keyword: optional, inside the Additional Fields collection, next to Title.
  • Title: optional, also in Additional Fields, the title stored for custom short URLs.
Use cases
a product launch spreadsheet holds one destination per channel, and the workflow gives each row its own short link before publishing.
03

Get stats for a URL

url.stats

What you see in n8n

Notes & use cases

Reads back what your instance has recorded for a single short link, which is how a workflow reports on a campaign without anyone opening the Yourls dashboard.

Key parameters

  • Short URL: the short link to report on. One call covers one link, so loop over a list when a campaign uses several.
Use cases
every Monday morning a scheduled workflow walks through last week's short links, collects their stats, and writes one row per link into a shared report.
Need help

Need help automating Yourls with n8n?

A person reads every message.

FAQ

Yourls and n8n, the usual questions

01Is the Yourls n8n integration free?
Yes on the n8n side. The Yourls node ships with n8n, so there is nothing to install and no extra fee, whether you run n8n Cloud or a self-hosted instance under the Community Edition and its Sustainable Use licence. The same workflow behaves identically in both. What sits outside that answer is Yourls itself: it is software you install on your own server, so the cost is whatever that server and its upkeep cost you. Nothing about pricing changes when you drive the instance from n8n rather than by hand.
02What credentials do you need for Yourls in n8n?
One credential, using an API key. n8n asks for a Signature token and the URL of your instance. The Signature comes from your Yourls admin, under Tools, then Secure passwordless API call, and it replaces a login and password in every request. The URL is simply the address where your instance answers. There is no authentication selector on the node, so this is the only method to set up. Create the credential once in the Credentials menu and every Yourls node in every workflow can pick it from a dropdown.
03What are the limits of the Yourls node in n8n?
The node exposes one resource and 3 operations: expand, shorten, and stats for a single short link. Anything else your instance can do through its API is not in the node, including listing all your links or deleting one, and stats are read one link at a time rather than in bulk. The fallback is the HTTP Request node, which calls any Yourls endpoint and reuses the same credential through predefined authentication. That means no missing feature blocks a workflow, it just takes one more node and the endpoint name.
04Is there a Yourls trigger in n8n?
No. Yourls has no trigger node, so nothing starts a workflow when a link is clicked or created. You start the run another way. A Schedule Trigger fires at a fixed interval, which fits reporting jobs built on the stats operation. An n8n Webhook, an URL that a third-party service calls, fits the case where another tool already knows something happened. And very often the run starts from another tool's trigger entirely, with the Yourls node sitting in the middle of the workflow rather than at its head.
05n8n or Make for Yourls?
It depends on where you want the data to sit. Yourls is self-hosted by design, and n8n can be too, on Docker or npm, so both the shortener and the automation layer stay on infrastructure you control. Make is hosted only, with no self-hosting option, and it bills per operation, which matters when a workflow shortens hundreds of links in one run. Make's visual editor is the more guided of the two. If your reason for choosing Yourls was keeping link data in house, the same reasoning usually points at a self-hosted n8n next to it.