How to combine multiple operations into one text to chatgpt analysis?


Hello! I have a webhook that triggers when a form is filled out with an attached PDF file containing images. This file is then passed to a module that converts the PDF into a zip file of images, which is decompressed in a file module to extract the images in bundles. Next, they are sent to Google Cloud Vision to extract the text from each image, but this process executes as individual operations, meaning it processes one by one without the option to aggregate them. Each individual operation is then passed to a ChatGPT module, where the text is analyzed, and certain important information is extracted from each image. My problem is that each operation is sent individually to ChatGPT, and finally, an email is sent with the result of each. What I need is to gather all these results into a single summary generated by ChatGPT, so I can send it as one email to the person who attached the document in the form. I hope someone can help me, thanks!

1 Like

Welcome to the Make community!

Aggregators

Every result (item/record) from a list/search/match module will output a bundle. This can result in multiple bundles, which then trigger multiple operations in future modules (one operation per bundle). To “combine” multiple bundles into a single variable, you’ll need to use an aggregator of some sort.

Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module. The next popular aggregator is the Text Aggregator which is very flexible and can apply to many use-cases like building of JSON, CSV, HTML.

There are other types of aggregator modules, click the below links to find out more:

Hope this helps! Let me know if there are any further questions or issues.

— @samliew

1 Like

Hi @Roberto_Suarez

After “Google cloud vision” module, you need to use “Text aggregator”. Select source module in text aggregator as “Archive” module to save aggregate all of them in one operation.

Regards,

Msquare Automation - Platinum Partner of Make
@Msquare_Automation

1 Like

Thank you so much! It works! I really appreciate it!

2 Likes

Glad that we could help you @Roberto_Suarez

Regards,

Msquare Automation - Platinum Partner of Make
@Msquare_Automation