Skip to main content
Generate UUID step

How and why you should use this custom step from the block store.

Updated over a year ago

After reading this article you'll learn how to:

  • Install the UUID step from the block store

  • Configure the UUID step

  • Use the step in certain use cases

Starting off

The UUID step is created by Betty Blocks, but it's not readily available in the standard set of steps within the action builder. But that doesn't matter, you can find it and install it from the block store. To do this navigate to the block store and search for 'uuid' it will pop up as the first hit.

Generate UUID block in the block store

Click on view details to check out what the block is about. In our case, the step will explain that you can generate a unique ID with a specified length. This tab also lets you install the block into one of your applications. Simply hit the Install block button and select your organization followed by your application.

Installing the generate UUID block

After installing the 'generate UUID' step, it can be found in your action builder of the application that was selected. You'll find it in the miscellaneous section of the action steps.

Installed generate UUID block in the action step overview

Configuring the step

Now for this example, let's keep things as plain as they can be. I've prepared a model called 'Coupon' in which I've created 3 properties:

  • Checkbox 'Active', required + default checked

  • Price 'Amount', required

  • Text (single line) 'Uuid, requires + has to be unique

Configuring the generate UUID step: adding a new model

Then a simple page in which a form is present for this model, a user can give the amount of a coupon and then generate it. The action that's attached to the form will generate a new coupon with the amount the user has filled in and generate a UUID for the coupon to ensure it's unique. The page looks like this:

Configuring the generate UUID step: adding a new form in the page builder

When we check the action it looks as follows:

Configuring the generate UUID step

As you can see for the configuration of the generate UUID step the only thing that we need to do is give a result. The result will contain a randomly generated UUID, we can then use this UUID in the create step to create a new coupon.

Configuring the generate UUID action flow: adding the create record

In the image above you can see that we use the 'generated_uuid' variable (the result fo the generate UUID step) in the create step. Once the coupon is created the UUID will look like this:

Coupon generated with the generate UUID step

Use cases

Below are links to some articles that make use of the 'generate UUID' step in their use case, some of these will use the 'generate random hex' step. Both steps function similarly, so when you see the latter step being used you could simply replace it with the 'generate UUID' step and it'll still function the way it does in the use case.

Did this answer your question?