Your task
Challenge 25
Your Own URL Shortener
Build a working link shortener in n8n: a form that makes short links, and a web address that redirects and counts every click.
Your bonus task
Add a stats address that lists every link with its click count, most clicked first, and lock the link-making form so only your team can create new ones.
Example use cases
- A team printing posters with a QR code who want to know which poster actually got scanned.
- A newsletter with three links, where the only question that matters is which one people clicked.
- Any small service that has to answer a real web request rather than only process data in the background.
Before you start
- 01
Sign up for n8n Cloud or open your n8n workspace. No other account is needed, and nothing is sent anywhere.
- 02
Create a Data Table called short-links with three columns: code and target as text, and clicks as a number.
- 03
This challenge only works once the workflow is published: test webhook URLs stop listening after one call, while the production URL stays up. Publish first, then try the links.
- 04
Keep the n8n Webhook node documentation open – the difference between the test and production URL trips up almost everyone the first time.
Nodes you'll use
What the workflow must do
- 01
Submitting a long address in the form returns a short code, and the link, the target and a click count of zero are stored in the Data TableA table that lives inside n8n and keeps its rows between runs, so the links and their click counts survive every execution..
- 02
Opening the short address in a browser lands on the long address, and the click count for that code goes up by exactly one per visit.
- 03
An address with a code nobody created answers "that short link does not exist" with a 404, and no row is touched. Bonus: the stats address lists every link, most clicked first, and the creation form asks for a username and password.
Tip
Need a tip?
Reveal up to five tips, one at a time.
Still stuck? Ask on the n8n community forum
Solution
See the workflow challenge answer
Reveal the completed workflow only when you are ready to compare it with your own.
Submit as solved
Ready to submit?
Submit when your team has a working workflow to demonstrate.