Hi everyone,
I’m facing an issue where the GPT completion result (16.result
) returns an array, but when I try to extract individual elements using get()
, it doesn’t work as expected. Instead of setting separate variables, Make stores the entire array inside each variable.
The GPT module (ID 16) generates a response strictly formatted as an array, for example:
["03/03/2025", "Comercial Carol", "1.100,00"]
In the Set Variables (ID 22) module, I’m trying to extract each element using:
{{get(16.result; 0)}} # Expected: "03/03/2025"
{{get(16.result; 1)}} # Expected: "Comercial Carol"
{{get(16.result; 2)}} # Expected: "1.100,00"
However, each variable ends up containing the full array instead of just the expected value. When storing these values in Google Sheets (ID 24), the issue persists: instead of saving separate values in each column, each column contains the entire array.
I have checked typeOf(16.result)
, which confirms that it is an array, not a string. I have tried using jsonparse(16.result)
in case it was being treated as a stringified JSON, but this didn’t change the behavior. I have also tried map(16.result; ""; "")
to force Make to recognize it as a list, but that did not work either. Using split()
is not an option since the format is already a structured array.
I need help understanding why get(16.result; 0 or 1 or 2)
is returning the entire array instead of just the first element. I would also like to know the best way to extract each value properly and store them separately in variables, ensuring that only the correct value is stored in Google Sheets without getting the full array in each cell.
Here you can see that the result comming from GPT Completion is an array:
This is how I’m trying to get elements of the array individually:
And here is one screenshot of how it’s saving the data incorrectly on spreadsheet:
I have attached the Blueprint JSON to provide full context. Any help would be appreciated.
blueprint (9).json (65.3 KB)
Thank you so much, guys.