If you try pushing the button right now, it probably still works. However, when you open the hood and take a closer look, you will quickly notice that it doesn't give you the outputs (and emails) you would expect.
Since you're already somewhat experienced in building Action Flows, you will have a suspicion of what the issue is: Our previous inputs are no longer there, which means that the mappings in our modules are broken. You might just want to replace the previous mappings with the new array inputs, but that doesn't work. All you have at your disposal is just the CustomerInformation array...
When we use an Array Input, the Action Flow receives all selected rows wrapped in a single consolidated batch of bundles. However, processing modules—like our AI prompt and the HTTP currency converter—are designed to work on one bundle at a time.
To bridge this gap and access individual items in our CustomerInformation collection, we use two modules that act as the logical bookends of our process: the Iterator and the Aggregator.
The "Exploder": The Iterator
The Iterator takes in an array with a series of bundles and outputs every array item as a separate bundle. In our case, it takes the CustomerInformation array received from the View and "explodes" it into individual bundles—in this case, individual customer information packages. If you select, for example, 5 rows in your table, the Iterator will produce 5 separate bundles.
To make the Array Input work for our Action Flow, let's add the "opening bookend":
Add the Iterator: Place it as the very first module in the Action Flow. Configuration: In the "Array" field, map the CustomerInformation array from your Inputs. The Result: Every module placed after the Iterator will now run once for every item in that list.
Now you can finally re-map the affected data pills in your Action Flow's modules with the outputs of the Iterator module.
Tip: Remember to "Run the new Iterator module only" to make its outputs visible and available to map in the succeeding modules. A panel will open up that lets you insert dummy values for that purpose.
Try the steps on your own first and only take a look at the video if you get stuck.
This is how you could do it...
The following solution video shows how to add the iterator module and re-map the new inputs. The video has no sound.
Steps taken in solution video Right-click the Action Flow editor canvas. Select "Add a module". Search for "Iterator" and select. Connect Iterator with Celonis - Create AI Prompt module. Optionally, click the Auto-align button. Click Iterator again to modify it. Click into "Array" field. From pop-up modal, select CustomerInformation input. Save Iterator configuration. Right-click iterator module. Select "Run this module only". Specify dummy data to run this module with, i.e.: "Test" for CustomerName "Test Country" for Country "100" for TotalRevenue Click Ok. Open Celonis module. Replace current "Country" input with Iterator output (Country). Save Celonis module. Open Resume module. Replace current "TotalRevenue" inputs with Iterator output (TotalRevenue). Save Resume module. Open HTTP module. Replace current "TotalRevenue" input with Iterator output (TotalRevenue). Save HTTP module. Open Email module. Replace current "CustomerName" input with Iterator output (CustomerName). Save Email module.
Save Action Flow.
If you were pushing the button in the View right now (after you versioned and deployed the Action Flow again), you would still receive two separate emails (assuming two rows selected in the table). This is because so far we've only "exploded" the input array, but haven't yet tied the resulting individual bundles back together.
This is what we'll achieve with an aggregator tool in just a few moments. For practical purposes, though, we'll first do an intermediate data "clean up" step to make our lives easier once we get to the aggregator.
The "Refiner": Set Multiple Variables
Inside the loop, our HTTP module fetches live exchange rates. However, API responses are sometimes "messy"—the value we need can, as in this case, be buried deep inside a complex JSON structure (e.g., data -> rates -> GBP).
To make our final report in our consolidated email clean, we use a Set Multiple Variables module to "catch" both the converted value as well as the identified currency and give them simple names.
Why do this? It allows the Aggregator to look for clear variables (like Customer_Currency and Converted_Amount) rather than trying to dig through raw API code for every single row. An alternative would be to create a single variable only and just map the converted value. The customer's currency, we technically already get from the AI module. We, however, deem the Action Flow logic to be a little more intuitive and easier to reverse engineer later on if needed.
Go ahead and add a "Set Multiple Variables" module in between your JSON and email module. Define two new variables, "Customer_Currency" and "Converted_Amount". Try to figure out how to calculate the values.
In case you get stuck, you know where to find the solution.. :)
This is how you could do it...
The following solution video shows how to add and configure the "Set Multiple Variables" module. The video has no sound.
Steps taken in solution video In the Action Flow editor, right-click the connection between the JSON and Email module. Select "Add a module". Search for the "Set Multiple Variables" module. Give the first of two variables a name, e.g. CustomerCurrency Specify a formula for the variable value. You need the outputs of the JSON module for the variable formula. You will most likely have to "Run the JSON module once". Right-click the JSON module to do so (and leave the 'Set Multiple Variables' configuration for now). You can use this as the sample JSON input: {"amount":100,"base":"EUR","date":"2026-02-17","rates":{"EUR":100}} Go back to the 'Set Multiple Variables' configuration. The JSON outputs are now available to map. Your formula for the CustomerCurrency variable value is: {{first(keys(16.rates))}}
Add a second variable. Name it, e.g., ConvertedValue. Your formula for the ConvertedValue variable value is: {{get(16.rates; first(keys(16.rates)))}}
Save the module configuration. Save the Action Flow.
👉🏼 Tip: Always feel free to version and deploy the current setup of the Action Flow and trigger an action from the View to fully comprehend what every adjustment we make results in! This is pretty much what you would do in reality, too.
The "Collector": The Aggregator
Once the data is processed and refined, we (still) have multiple individual results floating through the flow. We need to "re-pack" them into a single summary that we can then push into a single email.
Let's put up the "closing bookend":
Add the Aggregator: Place a Text Aggregator after your "Set Multiple Variables" module. A text aggregator is a special type of aggregator that works best for our use case to pass its result on to the email module. The Source Module (Crucial): Set the Source Module to your Iterator. This tells the Aggregator: "Wait here until the Iterator has finished every item in the batch before moving forward." Text: We're going to map the "Clean" variables we just created (e.g., Converted_Amount, Customer_Currency) as well as two other data points we also want to include in our final email: the customer name and the original amount (both right away from the Iterator module).
For formatting purposes in our email later on, you should specify the following logic in the text field:
{{Iterator.CustomerName}}</td><td>{{formatNumber(Iterator.amount; 2; "."; ",")}}</td><td>{{formatNumber(SetMultipleVariables.ConvertedValue; 2; "."; ",")}}</td><td>{{SetMultipleVariables.CustomerCurrency}}
Also, just for formatting purposes, enable advanced settings, select "Other" as the Row separator, and specify the following as the separator:
</td></tr><tr style="border-bottom: 1px solid #eee;"><td style="padding: 12px;">
You know the drill by now... Give it a shot and only look at the video if you get stuck.
This is how you could do it...
The following solution video shows how to add and configure the Text Aggregator module. The video has no sound.
Steps taken in solution video In the Action Flow editor, right-click the connection between the Set Multiple Variables and Email module. Select "Add a module". Search for the "Text Aggregator" module.
Click the "Source module" dropdown and select "Iterator". Copy the instruction regarding text from the course and paste them into the "Text" field. Replace potentially faulty mappings with the correct ones. Enable "Show advanced settings". Click the "Row separator" dropdown and select "Other". In the Separator field, copy and paste the the instruction from the course. Save the Text Aggregator configuration. Save the Action Flow.
Phew, this was quite a lot! Before we move on to the final edits, let's quickly recap what we did:
The Start: Receive 1 Consolidated Batch (Array Input). The Expansion: The Iterator breaks it into individual rows. The Refining: AI, HTTP, and Variable modules process and clean each row. The Collapse: The Aggregator catches everything and turns it back into 1 text block. The End: The Email module sends 1 consolidated report. Moving to the Final Result
Now that the data is being processed correctly, it’s time to see the final output. On the next page, we will finalize the Email module and take a closer look at the "hidden" logic we included in the blueprint (like the JSON module and the Resume module) to handle those tricky data inconsistencies.
_Media:_
- https://fast.wistia.net/embed/iframe/7buqyqm0ed?videoFoam=true
- https://fast.wistia.net/embed/iframe/9haytvw08g?videoFoam=true
- https://fast.wistia.net/embed/iframe/afw7166zj7?videoFoam=true
---