Español

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

  1. Add a Crypto node after your trigger.
  2. Set Action to Generate.
  3. Set Type to UUID.
  4. Set Property Name to id. The node writes the UUID into a field with this name.
  5. Run the flow. Each item that passes through the node gets its own UUID.

A quick example:

  1. A trigger (a webhook or a new Google Sheets row) brings the record's data.
  2. A Crypto node (Action Generate, Type UUID, Property Name id) adds an id field to each item.
  3. 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

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:

What you need

Step by step in the HTTP Request node

Add an HTTP Request node and fill it in like this:

{ "count": 1 }

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:

  1. A trigger (a webhook or a new Google Sheets row) with the record's data.
  2. The HTTP Request node above, requesting { "count": 1 }.
  3. A Set node that adds {{ $json.uuids[0] }} as an id field 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:

OptionDefaultWhat it does
count1How 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.