I want to get 40 random items from a sharepoint list based on their ID, but I don`t want them to repeat.
Hi @Robert94,
One approach could be to interact with a service like random.org and just collect such a set of unique numbers from there. This way you do not have to do this calculation in Power Automate.
After that you could use the array to retrieve the SharePoint list items with for example an apply to each loop and a get item action.
Below is an example of getting an array with 40 unique numbers in random order:
This hyperlink generates 40 unique numbers in plain text format.
split(trim(replace(body('HTTP'), 'Set 1: ', '')), ', ')
stampcoin
125
David_MA
109
Super User 2025 Season 1
Michael E. Gernaey
90
Super User 2025 Season 1