Is there a function or activity to generate a random number?

Hello everyone,

I have a query situation on a web portal where I have a process that uses shipping guide status queries, but for many queries the page blocks my IP and I can’t continue for a few seconds. So I’m trying to create a random query with a delay activity trying to trick the web site, randomizing the execution time so they can’t block me.

I hope someone knows if the random function exists.
Thanks, best regards.

@AldoAraujo, you may want to try the following workflow that uses an “Execute JS code” to calculate a random number:

image

First, you have to create de randomNumber variable and make it global. Then you have to execute the following line of JavaScript code that will generate a random number between 0 and 10: randomNumber = parseInt(Math.random() * 10) . And finally you can use the randomNumber variable in the “Delay” activity.

Hope this works!

4 Likes

Hello @dm.ferreyra,

This is exactly what I was looking for. Thank you very much!

Regarts.

1 Like