Skip to content
Docs

Faker

Faker generates synthetic test data. You write a JSON template whose string values name FakerPHP formatters, and the node emits the same shape with every formatter name replaced by a generated value. Use it to build and test a flow before the real data source is connected. You find it on the node picker’s Transform & data shelf.

The Faker node's settings form, with the fields described below
The Faker node's settings form, with the fields described below
FieldTypeDefaultDescription
Template (template)string ✦ (required) — A JSON template whose values are Faker directives (e.g. name, email, randomNumber) that get replaced with generated fake data.
Locale (locale)string ✦ (optional) — The locale used to generate the fake data, e.g. en_US or nl_NL; defaults to Faker’s standard locale when empty.

Fields marked ✦ accept expressions.

Try this node — run it once against your own workspace, with your credentials, without building a flow first.

Each string value in the template is matched against FakerPHP’s formatter names: name, email, uuid, city, iso8601, streetName, buildingNumber, and dozens more. Capitalisation and underscores do not matter, so streetName, streetname, and street_name all reach the same formatter. Numbers, booleans, and null pass through as-is.

Ahead of that exact match sits a small set of name guesses, and they fire on strings that are not formatter names at all:

  • a value starting with is_, or is followed by a capital (is_active, isPaid), generates a boolean
  • a value ending in _at or At (created_at, updatedAt) generates a date and time, and it serialises as a nested object rather than a timestamp string. Use iso8601 when you want a plain timestamp
  • a few aliases resolve to a different formatter: town to a city, zipcode to a postcode, login to a username, website to a URL, employer to a company, title to a whole sentence rather than an honorific, and body, summary, article, or description to a block of text

A string that neither the guesses nor the exact match recognise passes through unchanged, so you can mix generated and fixed values in one template, as long as the fixed value is not one of the strings above.

Set locale (for example nl_NL or fr_FR) to generate locale-appropriate names, addresses, and phone numbers. Left empty, it defaults to en_US.

An array whose first element is a number is a repeat instruction: the element after the count is the template for every generated item. This works at any nesting depth.

[3, { "id": "uuid", "names": [2, "name"] }]

This produces three objects, each with a fresh id and two generated names.

The node emits the populated document as JSON, in the same shape as the template. Every run generates new random values.

The Faker template in the gallery (Automation → Templates) generates ten Dutch address records with locale set to nl_NL. Its template, with a few of the address fields left out:

[10, {
"id": "uuid",
"active": "boolean",
"lastChange": "iso8601",
"addressTown": "city",
"addressStreet": "streetName",
"addressNumber": "buildingNumber",
"addressPostalcode": "postcode",
"names": [3, "name"]
}]
  • The repeat form triggers on any array whose first element is a number, so a plain list like [1, 2, 3] is read as “generate the value 2 once”, not as three literal numbers. Wrap literal number lists in an object, or emit them from an Injector instead.