How implode works
Implode mode of the Event Transform action does the opposite of explode. It collects individual events (typically from a previous explode operation) and reassembles them into a single event containing an array.
When you configure an implode action, you specify:
Item path: The data from each event to collect into the array.
Identifier path: The unique identifier to match related events (usually from the explode operation).
The "when to implode" criteria. Options include:
Size: How many events to collect before emitting.
Seconds: How long to wait before emitting an event.
Implode waits until it has collected the specified number of events (or the time limit is reached), then emits a single event containing all the collected data in an array. Let's take a look at the users array example we exploded earlier in the "Understand explode mode" section. If we were to configure an implode like so:
Item path:
explode_user_list.individual_user; the upstream reference path to the exploded individual element.Identifier path:
explode_user_list.guid; the GUID of the explode.Size:
explode_user_list.size; the upstream reference path to the explode's size (the number of elements in the original array).
We would be able to pull back all of the exploded events together into one singular event (like it was prior to the explode):
{
"implode_user_list": [
{
"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
}
]
}Use time-based implodes
Sometimes, you don't know exactly how many events to expect, or you want to collect events for a specific period. You can use the seconds parameter to address these sorts of scenarios.
For example, using our exploded users array, if we were to use the seconds setting set to 300 instead, this will make it so that the implode waits 5 minutes after receiving the first event, then emits whatever has been collected into a singular event.
ℹ️Info
When to use implode
Implode is valuable when you need to:
Collect results after processing exploded items.
Consolidate data from multiple story branches.
Gather paginated API responses into a single dataset.
Wait for multiple asynchronous story forks to complete.
Create a summary or report from individual processed items.