Skip to main content
Version: 1.28 (Current)

Create List from JSON

Audience: Low-code Engineers

Skill Prerequisites: Actions, Lists, Tokens, JSON

Reads a JSON array and turns it into a list. Each object in the array becomes one list item, and each of its values becomes a property of that item.

The JSON usually comes from a token, for example the response of a Server Request or a field that holds JSON. You can then go through the list with Execute Actions for each List Entry, or use it with the other list actions. The number of items is saved in the [<List Name>:Count] token.

The list only exists while the actions run. It isn't saved anywhere and isn't a Plant an App entity.

Typical Use Cases​

Don't use it to​

  • Read values from a single JSON object into tokens. Use Parse JSON Into Tokens instead.
  • Load an array that's nested inside an object in one step. The action has no path selector. Extract the array first, see Example 2.
  • Turn a list back into JSON. Use List to JSON instead.
Action NameDescription
Execute Actions for each List EntryRuns actions once for each item in the list.
Parse JSON Into TokensTurns a JSON object into tokens. Also useful to extract a nested array first.
List to JSONDoes the opposite: turns a list into a JSON array.
Create List from SQLCreates a list from the rows of a query.
Import List into DatabaseSaves the items of a list into a database table.
Extend List PropertiesAdds properties to every item of a list.
Server RequestCalls an API, whose JSON response you can load with this action.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
JSON ModelThe JSON to read, usually a token such as [OrdersJson]. It must be an array of objects, or a single object, which becomes a list with one item. See How the JSON becomes a list.Yesempty stringYes
List NameThe name of the list to create, for example OrdersList. If a list with this name already exists, it's replaced.Yesempty stringYes
On ErrorActions to run if the JSON can't be read. They can use the [Exception], [ExceptionType], [ExceptionMessage] and [ExceptionStack] tokens. See Considerations.NoemptyNo
Enforce ISO DateTimeWrites date values in ISO 8601 format, for example 2026-09-27T14:30:00.0000000Z. When it's off, dates use the server's regional format, for example 9/27/2026 2:30:00 PM.NofalseNo

Output Parameters Reference​

OutputDescription
List <List Name>The list, with one item for each element of the array.
[<List Name>:Count]The number of items in the list, for example [OrdersList:Count]. It's 0 if the array is empty.

How the JSON becomes a list​

Each element of the top-level array becomes one item. Its values become properties:

  • Simple values become a property with the same name, for example id or name. Property names aren't case-sensitive.
  • Nested objects are flattened with a dot, for example customer.email.
  • Arrays inside an item are flattened with the position, starting at 0, for example tags.0 and tags.1.
  • Nested objects and arrays as JSON. Inside Execute Actions for each List Entry, [ListName:customer] or [ListName:tags] also returns the whole object or array as JSON text. These JSON values aren't list properties, so other list actions, such as List to JSON, don't include them.

For example, this item:

[
{
"id": 1001,
"total": 49.9,
"paid": true,
"note": null,
"createdOn": "2026-09-27T14:30:00Z",
"customer": { "name": "Anna Berg", "email": "anna@example.com" },
"tags": ["new", "vip"]
}
]

gives these tokens inside the loop, when the list is named OrdersList:

TokenValue
[OrdersList:id]1001
[OrdersList:total]49.9
[OrdersList:paid]True
[OrdersList:note]empty
[OrdersList:createdOn]9/27/2026 2:30:00 PM, or 2026-09-27T14:30:00.0000000Z with Enforce ISO DateTime
[OrdersList:customer.name]Anna Berg
[OrdersList:customer.email]anna@example.com
[OrdersList:tags.0]new
[OrdersList:tags.1]vip
[OrdersList:customer]The customer object as JSON text
[OrdersList:tags]The tags array as JSON text

All values are stored as text:

  • true and false become True and False.
  • null becomes an empty value.
  • Text that looks like a date, such as 2026-09-27T14:30:00Z, is read as a date and formatted as described in Enforce ISO DateTime.
  • Decimal numbers are read with limited precision, about 7 significant digits. For example, 1234567.891 becomes 1234568. They're written with the server's regional settings, so the decimal separator may be a comma.

If the array holds simple values instead of objects, for example ["red", "green"], each item has one unnamed property. Inside the loop, read it with [ListName], for example [ColorsList].

Considerations​

  • Only arrays and objects. The JSON must start with [ or {. Other JSON, such as a single string or number, makes the action fail.
  • No path selector. An object is always loaded as one item, even if it contains an array. For a response such as {"items": [...]}, extract the array first with Parse JSON Into Tokens. See Example 2.
  • Tokens aren't escaped. Token values are pasted into JSON Model as they are. This is what you want when the token holds JSON. But if you build the JSON yourself, for example [{"name": "[Name]"}], a quote in the token value breaks the JSON.
  • The list is replaced. A list with the same name is replaced by the new one. To add items to a list, use Add List Entry.
  • List names are case-sensitive. OrdersList and orderslist are two different lists. Use the exact same name in the actions that follow.
  • Always set List Name. An empty name doesn't use the default list of a listing. It creates a list with an empty name, which other actions can't find.
  • The first item sets the property names. Actions that write every property, such as Create CSV from List with Include All Fields, use the properties of the first item. Properties that only appear in later items aren't included. The tokens of each item still work in the loop.
  • Precise numbers. For money, large IDs or other numbers that must stay exact, send them as strings in the JSON, for example "total": "1234567.891".
  • Duplicate names. Two properties whose names differ only by case, such as Id and id, make the action fail.
  • Errors. If the JSON can't be read, the list is empty and [<List Name>:Count] is 0. The On Error actions run first. Then the action still fails, unless an On Error action ends execution itself, for example Stop Execution. Administrators and low-code engineers see Failed parsing JsonModel: ... with the JSON. Other users see a generic error.

Examples​

tip

To understand how to use the below examples, please see Running Examples.

1. Load the orders returned by an API​

This action reads the JSON array in the OrdersJson token, for example the response of a Server Request. It creates the OrdersList list, with date values in ISO format. [OrdersList:Count] holds the number of orders.

{
"Title": "Create List from JSON",
"ActionType": "LoadEntitiesFromJson",
"Description": "Load the orders from the API response",
"Parameters": {
"JsonModel": "[OrdersJson]",
"EntityName": "OrdersList",
"EnforceISODateTime": true,
"OnError": []
}
}

Next, add Execute Actions for each List Entry with List Name set to OrdersList. Inside it, use tokens such as [OrdersList:id] and [OrdersList:customer.email], for example in a Send Email action.

2. Load an array nested inside a response​

The API returns an object such as {"total": 2, "items": [{"sku": "A1", "qty": 3}, {"sku": "B2", "qty": 1}]} in the ApiResponse token. First, Parse JSON Into Tokens with Base Token Name set to Response creates the [Response:items] token, which holds the array as JSON.

{
"Title": "Parse JSON Into Tokens",
"ActionType": "ParseJsonIntoTokens",
"Description": "Extract the items array",
"Parameters": {
"JsonString": "[ApiResponse]",
"BaseTokenName": "Response"
}
}

Then this action loads the array into the ItemsList list. Each item has the sku and qty properties.

{
"Title": "Create List from JSON",
"ActionType": "LoadEntitiesFromJson",
"Description": "Load the items",
"Condition": "[Response:total] != \"0\"",
"Parameters": {
"JsonModel": "[Response:items]",
"EntityName": "ItemsList",
"EnforceISODateTime": false,
"OnError": []
}
}

Revised 09/27/2026