Random Variable for Post!?

Welcome to the Make community!

When you have multiple bundles and want just one item, you can use an Array Aggregator first to combine them into an array, then use the shuffle-first functions.

If you already have an array, then just use the shuffle-first functions directly. You can put this in a Set Variable module if you need a module to put these functions in.

{{ first(shuffle(array)) }}

Example

Here is an example of how your scenario could look like:
Screenshot 2025-06-13 184705

This is just an example. Your final solution may or may not look like this depending on your requirements and actual data.

Module Export - quick import into your scenario

You can copy and paste this module export into your scenario. This will import the modules (with fields/settings/filters) shown in my screenshots above.

  1. Move your mouse over the line of code below. Copy the JSON by clicking the copy button on the right of the code, which looks like this:

  2. Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV (paste keyboard shortcut for Windows) to paste directly in the editor.

  3. Click on each imported module and re-save it for validation. There may be some errors prompting you to remap some variables and connections.

JSON module export — paste this directly in your scenario

{"subflows":[{"flow":[{"id":47,"module":"json:ParseJSON","version":1,"parameters":{"type":""},"mapper":{"json":"{ \"topics\": [\n\n\"topic 1\",\n\"topic 2\",\n\"topic 3\",\n\"topic 4\",\n\"topic 5\"\n\n]}"},"metadata":{"designer":{"x":-16,"y":-2138,"name":"Topics Array"},"parameters":[{"name":"type","type":"udt","label":"Data structure"}]}},{"id":48,"module":"util:SetVariable2","version":1,"parameters":{},"mapper":{"name":"topic","scope":"roundtrip","value":"{{first(shuffle(47.topics))}}"},"metadata":{"designer":{"x":229,"y":-2137,"name":"Get Random Topic"}}}]}],"metadata":{"version":1}}

Note: Did you know you can reduce the size of blueprints and module export code like the above, using the Make Blueprint Scrubber?

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

Getting Started

Help Centre Basics

Articles & Videos

Hope this helps! Let me know if there are any further questions or issues. P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!

@samliew

2 Likes