Creating an Email in Mockaroo

by Thanoshaan Thayalan

This blog post will look at how to create an email address that is equally created for each row in Mockaroo so it has the same syntax but different domains depending on their company.

Step 1:

Create an email field by clicking on adding another field and writing in the email field. If you open up Mockaroo and use the default schema, there is in email field already.

Step 2:

Change the type to username rather than having it as email address because the domain won't be the same as the name of the company. To do this, click on the type dropdown and type in username and it should show up.

Step 3:

Create a company field and have the type be Company in the same way we did step 2 just so we can add the domain into the formula we are about to create.

Step 4:

Now it's time to create the formula. Go back to the email field and click the sigma sign under the options tab to open up the formula tool.  The formula we are going to use is:

lower(this + "@" + field("[Insert Company Field]") + ".co.uk")

The 'this' refers to the value of this field so in this case, it's the email field. The field("[Insert Company Field]") represents the company name and will act as the domain. In the example that I've done, the company field is called Store Name so it will be field("Store Name"). The lower wrapped up the whole function so the email is all lowercase.

The end result should look something like this:

Avatar

Thanoshaan Thayalan

Fri 29 Jul 2022

Fri 29 Jul 2022