How explode works
When you configure an explode action, you specify:
Path: The field containing the array you want to explode.
To: The name of the field that will hold each individual element in the new events.
Limit (optional): The maximum number of events to emit (defaults to 500).
For example, if we have the following array of users in an action called "User list":
{
"results": [
{
"id": 1,
"first_name": "Ava",
"last_name": "Nguyen",
"email": "ava.nguyen@example.com",
"role": "admin",
"active": true
},
{
"id": 2,
"first_name": "Liam",
"last_name": "Hart",
"email": "liam.hart@example.com",
"role": "editor",
"active": true
},
{
"id": 3,
"first_name": "Sofia",
"last_name": "Ramirez",
"email": "sofia.ramirez@example.com",
"role": "viewer",
"active": false
}
]
}We set the "Explode user list" action's explode Path to point to the upstream action's array: user_list.results, and we set the explode's To value to: individual_user. Each element (aka each user in this example) within the array will have its own event that comes out of the explode:
{
"guid": "cefbd80f-5500-4030-b638-69d86015cf49",
"index": 2,
"size": 3,
"individual_user": {
"id": 3,
"first_name": "Sofia",
"last_name": "Ramirez",
"email": "sofia.ramirez@example.com",
"role": "viewer",
"active": false
}
}For each element in the array, Tines creates a new event that includes:
The individual array element in the field you specified (identified by the To value set in the explode. In our example, this would be
individual_user).An
indexkey showing the element's position in the original array (starting at 0).A
guidkey that uniquely identifies this explode operation.A
sizekey indicating the total number of elements in the original array.
When to use explode
Exploding is ideal when you need to:
Process each item in an array individually.
Perform different actions on each element.
Make API calls for each item in a list.
Apply conditional logic to individual items.
Enrich each element with additional data.