Creating an Email in Mockaroo

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:

Author:
Thanoshaan Thayalan
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab