Random number question

I would like to know if it is possible for the system to do the following:
Enter the following blog

in the page section where you can go to the page (1,2,3,4,5) detect the last number in this example would be (5) and that the random system mind 1 to 5 would give me a number.

As I know that the link to enter a new section the format is as follows:

I would like the number I get randomly here.

https://blog.hubspot.es/marketing/page/(here the random number)

With ui vision you can do this but need a custom macro

Could you please help me?