How to auto-generate a username?

How can I auto-generate a username?
Let’s say a user just signed up using their email and password. How can I auto-generate a username for them? Is this an instance where I should use an API? Maybe making an AWS lambda for it?

Do you want a random string or something? What kind of username do you want?

This is how I did it:

Let’s say the bloke is Andrew who is signing up for this example.

Ensure you have a “First Name” input box when signing a user up. When you click “sign the user up” in your workflow, add field username = (in this space click Calculate Formula and then Choose Random String. Choose the length of characters after the user’s name. So let’s say you want [users name]923821, put a 6 in that box and tick digits. If you want letters or symbols feel free to tick, if you want longer or less than 6 characters change the 6 to whatever. Then go back to where it says “Username =” it’ll say “Username = Calculate Random String”, click in front of “Calculate Random String” and put “First Name Input’s value” so that the value will be Username = First Name Input’s value Calculate Random String" and when a user signs up their user will be Andrew(followed by 6 random digits).

I’ve then done an action “Only when Search of User’s Usernames contains current user’s username: count is 2, make a change to Current User’s Username = Current User’s first name Calculate Random String” so it’ll give them a new username if there’s already one taken. I’ve copy and pasted that twice just incase the first username is taken, the second is taken and the third is taken.

3 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.