Senerio with Array Aggregator only writing the first collect of 3

When asking your question, please include:

Hi there,

Using airtable and GPT3 together to conduct analysis.

My airtable db has startups in it, those startups have company updates.

I’m building a simple senerio that gets a startup and their related updates and then iterate through them to get specific financial data.

Looks like this

When I run it the aggregator looks like I expect it to… 3 bundles converted into 1 bundle with a collection of 3 records (see below)

When it gets sent to the GPT module, it only sends the first collection instead of all 3.

Anyone know what I need to change?

Thanks in advance!

:footprints: The steps you have taken
:camera_flash: Relevant screenshots
:link: Any links you have
[ Code { "and": "JSON", "in" : "code block"} ]
:x: Exclude Personal Information.

Hi @Matt_Cooper ,

Can you please specify what your expected result is?
Do you want to execute the OpenAPI app 3 times? So per collection in your array?

Glenn - Callinetic

Hi Glenn, thanks for responding. I would like them to be one response with each collection in the one operation.

Like below

Alternatively it would also work if it could be formatted like this (CSV format)

Submitted,Runway in months,Current monthly burn,Monthly Recurring Revenue,Revenue YTD,Lifetime Revenue,Number of customers
January 2, 2023",11,“$85,000”,$0,$0,$0,0
September 27, 2022",13,“$100,000”,$0,$0,$0,0
September 27, 2022",13,“$100,000”,$0,$0,$0,0

Thanks for your help!

I’m not sure if I get your question right.
But I think you want to process each bundle one by one. In that case, you just can strip your array aggregator and map the right variables in the openAI module.

Glenn - Callinetic

Thanks Glenn. Actually I do want them in one bundle so I can use them in a single prompt for a GPT 3

So the format would look just like below in text but in one response

Ok. I understand it better now.
What I can think of you could do is using the text aggregator instead of the array aggregator.
This will output your result as text which is mappable to the right field in the openAI module.

Glenn - Callinetic

1 Like

Thanks @Callinetic

Still getting just the first record. Any other ideas?

Here is a video that walks through the explanation in a bit more detail

Ok. Thank you for your video to guide us through your scenario. I still think you need the text aggregator instead of your array aggregator. There you need to use the same text structure as what you use now for your openAI module.
So like this

It will output the result of your 3 matches as one text object. 3 times with the same text structure. The output of that module can then be passed through the openAI module.


1 Like

YEASS!!! Thank you @Callinetic Really really appreciate your help on this!


1 Like