if you want to create max 7 long random numbers your can do something like this;
What is your usecase? Something like “sending a mail to the user with information he needs to enter to confirm he is existing.”?
If so, you could also send him a deeplink. In the community commons there is an action called RandomHash that creates a random hash. This can be used as confirmation token.
Have a look at the Community Commons module on the App Store.
In StringUtils the RandomString action will let you configure a random string that you could use. If you are using this to generate a link, the RandomHash action may be a better option.