Albato
  • Language
    En
    English
    Portuguese
    Spanish
  • Welcome to Albato Help

    Aggregator Tool


    IN THIS ARTICLE

    The Aggregator collects individual data rows into a single array. It works as the opposite of the Iterator tool:

    • The Iterator splits an array into separate elements.
    • The Aggregator combines elements back into an array.

    If the Iterator allows you to process each item separately, the Aggregator helps you assemble everything into the correct format for the final step.

     

    Why you need the Aggregator

    When a step expects an array (for example, line items in an invoice), Albato must receive that array as a single structured object.

    If you map fields directly from different steps after an Iterator, the system cannot automatically combine them into one array. This leads to a structure conflict and results in an error.

    The Aggregator solves this problem. It combines data from multiple steps into one structured array. The final step then receives everything from a single source — correctly formatted and without conflicts.

    Typical workflow:

    Iterator → Data processing → Aggregator → Final step

     

    How to configure the Aggregator

    aggregator2.png

    In the settings, you need to add fields. Each field represents one column of the future array.

    aggregator1.png

    For every field, you configure two parameters:

    • Name

    You define the field name yourself. This name will be available in the following steps.

    • Select a field

    The data source from any previous step in the automation. These selected values will form new row sections that are later passed forward as an array.

    Within one Aggregator step, you can collect data simultaneously:

    • from the Iterator;
    • from processing tools (for example, Mathematical operation);
    • from other previous steps.
     

    Example: Creating an invoice in Zoho Books with order line items

    Let’s review a real automation example.

    The goal is to create an invoice in Zoho Books when a new order is received and pass all order positions as line items.

    The automation looks like this:

    Webhook → Find customer → Iterator → Data processing → Aggregator → Create invoice

    aggregator3.png

     

    Step 1. Incoming webhook

    The automation starts with Webhook: Incoming webhook.

    The webhook sends an order that includes an array of products. Each item contains:

    • product name;
    • price;
    • quantity;
    • tax;
    • shipping;
    • promo code.

    At this stage, the data exists as one object containing an array of items.

     

    Step 2. Find the customer

    The next step is Google Sheets: Find a row.

    Here, the automation uses the email received from the webhook to search for the matching customer in a Google Sheets table. Once the correct row is found, it retrieves the Customer ID, which is required to create the invoice in Zoho Books.

    This logic is separate from the array processing but required for the final step.

     

    Step 3. Iterator

    In this step, the Iterator selects the Items array received from the webhook.

    aggregator4.png

    By choosing Incoming webhook, the automation splits the order items into individual rows. Each product is then processed separately in the following steps.

    This allows you to calculate taxes, modify descriptions, or adjust values for every item before assembling them back into a structured array.

     

    Step 4–5. Processing each item

    After the Iterator, each item is processed separately.

    At this stage, you can apply additional tools, for example:

    • use the Remove tags tool to clean the product description;
    • use the Mathematical operation tool to calculate tax or other values.

    aggregator5.png

     

    Step 6. Aggregator

    After processing, the Tool: Aggregator step is added.

    aggregator6.png

    This is where the key transformation happens.

    In the Aggregator settings, fields are added:

    • Text → from Remove tags
    • UnitCost → from Iterator
    • Quantity → from Iterator
    • Item tax → from Iterator
    • Discount → from Incoming webhook
    • Shipping → from Iterator
    • Tax% → from Mathematical operation
    • Product name → from Iterator

    What happens next?

    The Aggregator:

    1. Takes the first iteration.
    2. Collects all specified fields.
    3. Forms one row of the array.
    4. Moves to the second iteration.
    5. Repeats the process.

    As a result, a new structured array is created. This array becomes a single data source for the next step.

     

    Step 7. Table replacement

    After the Aggregator, a Table lookup tool is used to transform specific values before sending them to Zoho Books.

    In this step, the system checks the value received from the previous step (for example, a tax percentage or internal code) and replaces it with the corresponding ID required by Zoho Books.

    This is necessary because Zoho Books does not accept raw percentages like 5 or 20. Instead, it requires internal Tax IDs. The Table lookup step maps readable values to the exact IDs expected by the service.

     

    Step 8. Creating the invoice in Zoho Books

    After configuring the previous steps, add the action Zoho Books: Create Invoice.

    aggregator7.png

    In the Line items section, each field is mapped from the Aggregator result:

    Name → Aggregator: Product name
    Description → Aggregator: Text
    Rate → Aggregator: UnitCost
    Quantity → Aggregator: Quantity
    Percentage tax → Aggregator: Tax%

    This means Zoho Books receives a fully structured array of line items, with all required values already processed and formatted correctly.

     

    Conclusion

    The Aggregator ensures that array-based data is passed correctly to the final service.

    It combines processed rows into one structured array that the receiving service can accept without conflicts or formatting issues.

    If your automation uses the Iterator and collects array data from multiple steps, the Aggregator becomes an essential part of the workflow. It makes complex automations stable, predictable, and technically correct.

    To learn more about how our tools work, explore our blog. You can find a detailed guide on the Iterator tool in this article.

    If you have any questions, our support team is always available in the live chat.

    Did this answer your question?