<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=612681139262614&amp;ev=PageView&amp;noscript=1">
Skip to content

Need help? Talk to an expert: phone(904) 638-5743

Using Power Automate to Create a Random Picker

Using Power Automate to Create a Random Picker

In this tutorial, Jonathon Silva walks us through how to use Microsoft Power Automate to create a random picker that selects items from a predefined list. Whether you're looking for a random dinner idea or want to select a winner for a sweepstakes, this process can automate decision-making to save you time. Let's dive into how Power Automate can streamline the process of picking a random item.

 

The Need for a Random Picker

Have you ever struggled to decide what to eat for dinner? Jonathon shares a relatable scenario where, every day, he and his wife face the dilemma of picking a meal from a rotating list of favorites. To remove the uncertainty, Jonathon decided to automate the process using Power Automate.

By creating a list of dinner options, Power Automate can randomly select a meal for the day, taking away the guesswork. The beauty of this solution lies in its simplicity and how it can be applied to other areas, like choosing sweepstakes winners or randomizing tasks in an office setting.

Setting Up Power Automate

1. Create a Table for Your List

First, Jonathon creates a simple table listing his family’s favorite meals. This table only needs one column, where each row represents a meal option. This list can be expanded to include any other items you might want to randomize, such as names for sweepstakes or tasks for employees.

2. Start a New Flow

In Power Automate, create a flow that triggers manually or on a schedule. For Jonathon’s example, he uses an instant cloud flow that is manually triggered. The goal is to randomly select one item from the list whenever the flow is triggered.

3. List the Rows from the Table

To begin, list the rows from the table you created. Jonathon sets this up in Power Automate by selecting the option to list the rows present in the table containing the meal options. This step pulls the data from the table so it can be used for the random selection process.

4. Compose a Random Value

Next, Jonathon uses the "Compose" data operation in Power Automate to randomly select an item from the list. He sets up an expression that accesses the entire body of the table, which contains the meal options. Using the “Rand” function, the flow generates a random number to choose an item from the list.

5. Set Up Dynamic Expressions

To ensure the random picker works regardless of how many items are in the table, Jonathon uses dynamic expressions. Instead of manually inputting the number of items in the list, he uses the "length" expression, which automatically adapts to the number of entries in the table.

6. Send the Random Selection via Email

Once the random item is selected, Jonathon sets up the flow to send an email with the randomly chosen meal. He uses Power Automate’s email integration to notify himself of the dinner choice. The email contains the selected item, ensuring there is no need for manual decision-making.

Testing and Refining the Flow

After setting up the flow, Jonathon tests it by manually triggering it. Each time the flow runs, a new item is randomly selected and sent to his email. He demonstrates this by running the flow multiple times, showing different meal selections each time. If needed, the flow can also be scheduled to run at specific times, such as daily, to automate the dinner planning process completely.

Applications Beyond Dinner

While Jonathon’s example focuses on dinner choices, the random picker can be applied to many different scenarios. For instance, it could be used for:

  • Randomly selecting a sweepstakes winner from a list of entries.
  • Assigning tasks to employees in a fair and randomized manner.
  • Choosing winners for giveaways or contests.

The possibilities are endless, and the power of Power Automate makes it easy to implement in a variety of use cases.

Conclusion

Jonathon’s demonstration shows just how easy it is to use Microsoft Power Automate for random selection tasks. By leveraging the tools in Power Automate, users can automate decision-making processes, save time, and remove human error. Whether it's deciding what’s for dinner or selecting winners for a contest, Power Automate can simplify the process and make life easier.

Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Power Automate and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks. 

Sign-up now and get instant access

Leave a comment

Free Community Plan

On-demand learning

Most Recent

private training

Hackathons, enterprise training, virtual monitoring