ÃÛ¶¹ÊÓƵ

Aggregator module

An aggregator module is a module that merges several bundles of data into a single bundle.

Access requirements

Expand to view access requirements for the functionality in this article.

You must have the following access to use the functionality in this article:

table 0-row-2 1-row-2 2-row-2 3-row-2 layout-auto html-authored no-header
ÃÛ¶¹ÊÓƵ Workfront package Any
ÃÛ¶¹ÊÓƵ Workfront license

New: Standard

Or

Current: Work or higher

ÃÛ¶¹ÊÓƵ Workfront Fusion license

Current: No Workfront Fusion license requirement.

Or

Legacy: Any

Product

New:

  • Select or Prime Workfront plan: Your organization must purchase ÃÛ¶¹ÊÓƵ Workfront Fusion.
  • Ultimate Workfront plan: Workfront Fusion is included.

Or

Current: Your organization must purchase ÃÛ¶¹ÊÓƵ Workfront Fusion.

To find out what plan, license type, or access you have, contact your Workfront administrator.

For information about ÃÛ¶¹ÊÓƵ Workfront Fusion licenses, see ÃÛ¶¹ÊÓƵ Workfront Fusion licenses.

Aggregator module overview

When an Aggregator module executes, it does the following:

  • Accumulates all the bundles from a single source module’s operation.
  • Outputs a single bundle with an array containing one item per accumulated bundle. The content of the array’s items depends on the particular Aggregator module and its setup.

The following image shows a typical setup of the Aggregator module :

Array aggregator

Source Module

The module where the bundle aggregation starts. The source module is usually an iterator or a search module that outputs a series of bundles.

When you setup the aggregator's source module (and close the aggregator's setup), the route between the source module and the aggregator module are wrapped in a grey area, so that you can see clearly the start and the end of the aggregation.

For more information on iterators, see Iterator module.

For more information on search modules see Search modules in Module overview.

Target structure type

(Applicable only for the Array aggregator module.)

The target structure where the data is aggregated. The default option, Custom, enables you to choose items that should be aggregated into the Array aggregator's output bundle's Array item:

After you connect more modules after the Array aggregator module, and return to the aggregator module's setup, the Target structure type drop-down menu contains all following modules and their fields that are `Array of Collections` type.

In this example, the Attachments field of the Slack >Create a Message module appears in the Array aggregator > Target structure type field.

Aggregated fields
The fields that you want to include in the aggregator module output.
Group by

Using the Group by field, you can define an expression containing one or more mapped items. The aggregated data will be then separated into Groups by the value of the expression. Each Group outputs as a separate bundle, containing a Key and an array of data. By grouping results, you can use the Key as a filter in subsequent modules.

Each bundle contains two items:

  • Key: The value that you are grouping by.
  • Array: The aggregated data from the bundles for which the formula evaluated to the Key value.
Stop processing after an empty aggregation
By default, the Aggregator module outputs the result of the aggregation even when no bundles reached the Aggregator module (for example, because they have been all filtered out of the path that includes the aggregator). If the option Stop processing after an empty aggregation is enabled, the Aggregator module does not produce any output bundle when there are no input bundles. Instead, the flow stops.
NOTE
Bundles generated by modules between the source module and the Aggregator module are not output by the Aggregator module. These bundles are not accessible by the modules in the flow after the Aggregator. If you need any data from a bundle outputted by a module between the source module and the Aggregator module, make sure to include the given item in the Aggregator module’s setup (such as in the Aggregated fields field in the setup of the Array aggregator module).

Example scenario of how aggregators work

This example scenario shows how to zip all email attachments and uploading the ZIP to Dropbox.

Dropbox archive example

The scenario below shows how to:

  • The first module watches a mailbox for incoming emails. The Email >Watch emails trigger outputs a bundle with item Attachments[], which is an array containing all the email’s attachments.

  • The second model iterates the email’s attachments: Email >Iterate attachments iterator takes the items from the Attachments[] array one by one and sends them further as separate bundles.

  • The third module is the aggregator. It aggregates the bundles outputted by the Email >Iterate attachments module. Archive >Create an archive aggregator accumulates all the bundles it receives and outputs a single bundle containing the ZIP file.

  • The last module uploads the resulting ZIP file to Dropbox. Dropbox > Upload a file obtains the ZIP file from the Archive > Create an archive module and uploads it to Dropbox.

Below is a sample setup of the Archive > Create an archive aggregator:

Create an archive

recommendation-more-help
7e1891ad-4d59-4355-88ab-a2e62ed7d1a3