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
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.
How do you connect n8n to your Yourls instance?
- 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.
- 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.
- 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.
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.
Operations index
URL
3 operationsExpand a URL
url.expandWhat 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.
Shorten a URL
url.shortenWhat 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.
Get stats for a URL
url.statsWhat 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.
Need help automating Yourls with n8n?
A person reads every message.

