Aggregrate each group of PDF bundles into a new pdf file

:bullseye: What is your goal?

Output from Google Cloud Vision OCR module successfully results in an array of pdf bundles (one page per bundle). My goal is to aggregate groups of bundles into new pdf files. Each group is identified with a specific word (“STEINMANN”) contained in the first bundle of the group. For example, the OCR module results could have 5 bundles. The 1st and the 4th bundle may contain the specific word STEINMANN. In this case, I need to a new pdf created for bundles 1-3, and a separate pdf for bundles 4-5.

:thinking: What is the problem & what have you tried?

My attempt:
Set Variable - Variable Name = groupID, Variable Value =0
Iterator - Array = Total Number of Bundles (from the OCR module)
Set Variable - Variable Name - groupID,
Variable Value = {{if(contains(5.fullTextAnnotation.text; “STEINMANN”); groupID + 1; groupID)}}
Array Aggregator - Source Module = Iterator [6], Aggregated fields = value, Group by = {{7.groupID}}

I can’t get the Iterator to run more that once, and I can’t get the Aggregator to output a pdf file. I’m not sure if I even have the right approach. This rookie needs some guidance :-).

:clipboard: Error messages or input/output bundles

BundleValidationError
Validation failed for 1 parameter(s).
Missing value of required parameter ‘name’.

:link: Create public scenario page

Hey there,

The aggregator will never output a pdf file, it outputs an array.

You need one of the third party apps that merge pdfs. Like pdf.co or pdf4me or one of the other dozen of apps that process pdfs.