uuid

Learn how to generate a random UUID.

Generates a random UUID v4 string. Each call produces a new unique value, so calling uuid() twice in the same template yields two different identifiers.

Example

The following template prints a generated identifier:

template.json5
{  "$schema": "https://schema.croct.com/json/v1/template.json",  "title": "UUID demo",  "description": "Prints a generated UUID.",  "actions": [    {      "name": "print",      "message": "Generated ID: ${uuid()}"    }  ]}

Each run produces a different value, for example Generated ID: 550e8400-e29b-41d4-a716-446655440000.

Parameters

This function takes no parameters.

Return

A UUID v4 string such as 3f2504e0-4f89-11d3-9a0c-0305e82c3301.