generate guid

This block is part of the value group and was last modified in core v14.0.4.

generate guid v14.0.4

Generates a unique GUID. When a seed is provided, the GUID is deterministic (same seed always produces the same GUID) : the sha256 of the seed, the same derivation the document blocks apply to their guid_seed pin. Wire this output into verbatim guid pins (get / update / remove) to address seed-created documents. Never wire it into a guid_seed pin: that would hash the already-hashed value again and address a different document : give guid_seed pins the raw seed instead.

In pins 1
  • seed v14.0.4
    value

    Optional base value to generate a deterministic GUID from (e.g. concatenation of itemfeed_guid + user_guid). When empty, a random GUID is generated.

Out pins 1
  • guid
    value

With seed wired the output is DETERMINISTIC: the 64-char SHA-256 hex of the seed, the same derivation document blocks apply to guid_seed pins - wire it into verbatim guid pins, never into a guid_seed pin (that double-hashes). Without seed it outputs a random 40-char SHA-1 hex, different every run.

A typical wiring for generate guid: concatenate values feeds the seed pin; the guid out pin feeds get document.

Studio canvas example for the generate guid block: typical wiring for generate guid.

Commonly used with

In production blueprints, this block is most often wired together with:

  • concatenate values: feeds into this block.
  • get document: this block feeds into it. get a specific document based on the given GUID.
  • update document: this block feeds into it. Update document in the given storage and creates a revision for it.
  • rename: this block feeds into it. Renames the given files.
  • upsert document: this block feeds into it. Creates or updates a document with the given GUID. If the document does not exist, it will be created. If it already exists, the mutations will be applied to the existing document.
  • remove document: this block feeds into it. Removes the given document from the given storage.

Version history

Introduced in v14.0.4.


Back to value Return to the main group to view all sub-groups Back to value Return to the group to view all blocks within this group