Lee este artículo en español.
How to Generate a UUID in n8n (Free, with the Crypto Node)
Updated
Short answer: n8n can generate UUIDs for free with the built-in Crypto node. Add it, set Action to Generate, set Type to UUID, and set a Property Name such as
id. You don't need an API for this. An API only makes sense if you need a batch of up to 100 UUIDs in one call.
A UUID is a long unique identifier. You use one when you need to name a file so it never clashes with another, give a record an ID that doesn't depend on a database, or tag each run of a flow.
The free way: the Crypto node
- Add a Crypto node after your trigger.
- Set Action to Generate.
- Set Type to UUID.
- Set Property Name to
id. The node writes the UUID into a field with this name. - Run the flow. Each item that passes through the node gets its own UUID.
A quick example:
- A trigger (a webhook or a new Google Sheets row) brings the record's data.
- A Crypto node (Action Generate, Type UUID, Property Name
id) adds anidfield to each item. - The next node saves the record using
{{ $json.id }}.
Every record is born with a unique identifier, with no extra account and no API key.
When the Cofferdock API is worth it
- You need many at once. The Cofferdock API returns up to 100 UUIDs in one call, as a list.
- You want the same call from different tools. The same request works from n8n, Make, Zapier or your own code.
- If you only need a UUID inside n8n, the Crypto node is the better choice. It is free and needs no account.
What you'll get
You ask for how many UUIDs you need (1 to 100) and get them back as a list. One UUID or a hundred, in the same call.
Common uses in n8n:
- Giving every new record a unique ID before saving it.
- Naming uploaded files so no two ever collide.
- Generating a tracking identifier for each flow run.
- Creating one-time tokens for temporary links.
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/generate-uuid - 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:
{ "count": 1 }
- Under Options → Response → Response Format leave it as JSON.
The response includes uuids, always as a list (even when you ask for just one), ready to use with {{ $json.uuids[0] }}.
A quick example
Say you create a new record with its own ID, without relying on a database's auto-increment:
- A trigger (a webhook or a new Google Sheets row) with the record's data.
- The HTTP Request node above, requesting
{ "count": 1 }. - A Set node that adds
{{ $json.uuids[0] }}as anidfield before saving the record.
Every record is born with a unique identifier, without touching the database.
Options you can tweak
Add it in the same JSON body:
| Option | Default | What it does |
|---|---|---|
count | 1 | How many UUIDs to generate at once (1 to 100). |
Prefer to see it in code?
The same call with curl:
curl -X POST "https://api.cofferdock.com/generate-uuid" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"count": 5}'
How much does it cost?
Each call uses 1 credit from your plan, whether you generate 1 UUID or 100. Every Cofferdock tool draws from the same pool of credits.
FAQ
Does n8n have a native node to generate UUIDs? Yes. The Crypto node has a Generate action with Type set to UUID (n8n docs). It is free and needs no account or API key.
What UUID version does it generate? The Cofferdock API generates v4 (random), the most common choice for identifiers with no encoded meaning. n8n's documentation doesn't say which version the Crypto node uses, so if the version matters to you, check it in your own flow.
Can I request several UUIDs at once? Yes, up to 100 in the same call, with count, through the Cofferdock API.
Can UUIDs repeat? The odds of a collision are effectively zero: a v4 UUID has 122 random bits, about 5.3 × 10³⁶ possible values.
Related guides
Try it yourself
You'll find the full instructions, with copy-paste examples, on the UUID generator page. And if you don't have an account yet, you can create one for free and build your first flow today.