Splitting data into bundles

My goal is to have a bundle with each total_pris_x and faktura_nummer_x in it.
Bundle 1:
Bundle 2:

I have tried to use aggregator which didn’t seem to work as a solution, since i can’t merge them all together afterwards. I need the dynamically.

Here you can see that i am getting ChatGPT response stacked this way.
My promt:

I made a little mistake in my prompt (when i wrote it) it is currently as seen:

If mutiple outputs stack it like this:
faktura_nummer_1: (this line should have been: “faktura_number_2:”) but i think it still got what i ment.

My end end goal is that ChatGPT that analyzes for total price and invoice number can look in a connected sheets to check if prices match:
Skærmbillede 2024-04-02 kl. 22.43.21

So if the number match it will say approved.

Right now i have a working scenario for only one file at a time. But i need to run mutiple (like 20+)

I run this by using regex in match pattern regex101: build, test, and debug regex and then afterwards using each output dynamically.

I currently have a filter that searches for all cells in my sheet and then i have a filter making sure i connect invoice numbers correct:

This filter ensures that the invoice number im looking for is in the sheet.

My issue is now as described to get mutiple outputs at once and handling them all at the same time.

Hey, @Sebastian2
Write Prompt in ChatGPT Module to give reponse in JSON like this -

“total_pris” : “value”,
“faktura_nummer” : “value”

Then use Parse JSON Module, you will get all values in different bundles and then you can put data easily in sheets.



Just tested
“total_pris” : “26200”,
“faktura_nummer” : “406”
“total_pris” : “7500”,
“faktura_nummer” : “1”

this works fine, only issue is that ChatGPT actually outputs this:
Skærmbillede 2024-04-03 kl. 10.07.32

Any good prompts to get rid of this “```json” and at the bottom too?

Use replace function

Copy this and paste in Parse JSON Module
{{replace(replace(“json data”; “json"; emptystring); "”; emptystring)}}



I’m pleased I could assist you. Kindly ensure to designate my response as the solution, which will benefit other community members should they encounter a similar issue in the future.