How to Combine and Count Text Values from Iterator Output

Hi everyone! :waving_hand:

I’m working on a scenario where I need to transform some categorized text into a combined summary string.

Here’s the setup:

  • I receive orders from Shopify that include line_items.
  • Each line_item has a product type which I then map to a category using a table in Airtable.
  • For that, I used an Iterator to go through each item and assign the correct category.
  • So far, so good — I now have one bundle (or operation) per item, each with a field called category (e.g., “Services - HP”, “Material - PV”, etc.):

Here’s what I need help with:

:wrench: Goal:
I want to combine all the resulting categories and count how many times each appears, then generate a summary string in this format:

“Services - HP (2), Service - PV (1)”

:right_arrow: For example:
If the order had 3 products, with 2 categorized as “Services - HP” and 1 as “Service - PV”, I want the final output to be: Services - HP (2), Service - PV (1)

I’m trying to achieve this in a Set Variable module after the Array aggregator, but I’m not sure how to count the repeated categories and build the combined string dynamically. This is the current Setup:

Does it make sense the Source Module of the Array Aggregator is the Iterator?

Any ideas on how to structure this?

Thanks in advance! :folded_hands: