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.
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.
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.
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.
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.
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.
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.
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.
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.
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:
The possibilities are endless, and the power of Power Automate makes it easy to implement in a variety of use cases.
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.