Lee este artículo en español.
How to generate a URL slug in n8n (one node)
Updated
If you automate content publishing with n8n (articles, products, pages), you need to turn the title into a slug: the URL-friendly part with no accents, no spaces, and lowercase ("New Year 2026!" → "new-year-2026"). Doing it by hand with regular expressions gets messy fast with accented characters. With the regular HTTP Request node and the Cofferdock API, you handle it in one step.
Quick note: n8n has no dedicated "generate slug" node. You do it with the HTTP Request node calling an API that already handles accents, casing and odd characters for you.
What you'll get
You send any text and get back the slug already cleaned up: lowercase, no accents, only letters and digits separated by whatever character you choose.
Common uses in n8n:
- Generating a new article's URL before publishing it to your CMS.
- Creating a product page's slug from its name.
- Normalizing file names so they don't break on upload.
- Generating friendly paths for pages created automatically.
What you need
- A Cofferdock account. The free tier gives you 50 uses/month with no card.
- Your API key, from your dashboard with "+ Create key". It's shown only once.
- An HTTP Request node in your n8n flow.
Step by step in the HTTP Request node
Add an HTTP Request node and fill it in like this:
- Method:
POST - URL:
https://api.cofferdock.com/slugify - Send Headers: turn it on and add two:
x-api-keywith your key, andContent-Typewith the valueapplication/json. - Send Body: turn it on → Body Content Type:
JSON→ in the body:
{ "text": "={{ $json.title }}" }
- Under Options → Response → Response Format leave it as JSON.
The response includes slug, ready to use as part of the URL with {{ $json.slug }}.
A quick example
Say you publish articles automatically from a spreadsheet:
- A trigger (a new Google Sheets row) with the article's title.
- The HTTP Request node above, which generates the slug from the title.
- A node for your CMS (or a call to its API) that creates the article at that URL.
Every article is born with a clean URL, with no accents or spaces to break the link.
Options you can tweak
Add it in the same JSON body:
| Option | Default | What it does |
|---|---|---|
separator | - | The character between words. 1 to 3 characters: lowercase letters, digits, _ or -. |
Prefer to see it in code?
The same call with curl:
curl -X POST "https://api.cofferdock.com/slugify" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "New Year 2026!"}'
How much does it cost?
Each call uses 1 credit from your plan. Every Cofferdock tool draws from the same pool of credits.
FAQ
Does n8n have a native node to generate slugs? No. n8n's expressions can get close (n8n docs): replaceSpecialChars() turns accented letters into plain ones and toSnakeCase() lowercases and joins words with underscores, but you'd still have to swap the underscores for hyphens. The Cofferdock API, through the HTTP Request node, does it all in one step.
Does it handle accented characters properly? Yes, it normalizes the text (á, é, ñ, ü...) before cleaning it up, so "Café" becomes "cafe".
Can I use a separator other than a hyphen? Yes, with separator. For example _ if your CMS prefers underscores.
What happens if the text is only symbols or ends up empty after cleaning? It returns an empty slug; it's worth checking that with an IF node before using it as a URL.
Related guides
Try it yourself
You'll find the full instructions, with copy-paste examples, on the slug generator page. And if you don't have an account yet, you can create one for free and build your first flow today.