Using random() in a microflow creates a random number between 0 and 1. You can then multiply this number to fit it to your specified limit.
The solution of Robbert was perfect.
I’ve created a integer/long variable and used: round(random() *10)
This gets you a random integer.