Hi everyone,
Couldn’t find any response to my problem anywhere, i’m stuck for about 4 days i’m going crazy.
I’m running 5 API sequences [Create Message + Run Assistant + Read Message] to an OpenAI Assistant using HTTP requests
Each run returns an output array where every object contains an unparsed JSON string that I want to extract and use in a document (Notion, Google Doc, etc.).
So first of all this is the output I get from an HTTP Request (it’s a JSON module because i’m working on a mock) :
If I zoom in, there is what I look for : datacontenttext.value
I only need data[1,3,5,7,9] because the other are not actual JSON strings. These are the input command on my OpenAI assistant so i don’t need them.
What I’ve tried
- I use an Iterator on the output array to process each element
- I filter so that only the actual JSON response strings are processed.
- I then run each string through the JSON Parser module after the Iterator.
Main Issue :
-
The JSON Parser creates 5 separate operations with 1 bundle each which makes it impossible to aggregate all the data into a single mapping for Notion or Google Docs.
-
If I add an Array Aggregator after the JSON Parser, I get the same result: 5 operations, each with only 1 bundle.
-
If I put the Array Aggregator before the JSON Parser (immediately after the Iterator),
and try to parse the array as a whole (e.g., ontext.value
for all items),
the JSON Parser will only parse the first element of the array
What I want: Parse all my JSON strings and end up with a single bundle containing an array of all the parsed objects (by type: “situation”, “objectives”, etc.) for easy use in Notion/Google Doc modules.