Open ai generated json to google sheet rows

Hello I need help. I have allready tried almost everything but nothing is working.

This is my process:

I want to generate for each day of a month a event. Therefor I have made a OPENAI Request, that provides me an JSON Structured Output:

In the next Step I want to iterate all Entrys and create for each entry a row in a excel sheet. When I select the Iterate Module I can’t select the JSON:

I don’t know what to do next to make this scenario work.

Please can anybody help?

Hey @weooo_GmbH ,

Try to add an Array aggregator after the Parse JSON module, that will create an array of all your data.
And then you will be able to map that Array into the Iterator.

Please let me know if this helps !

1 Like

Welcome to the Make community!

1. Screenshots of module fields and filters

Please share screenshots of the Parse JSON module fields question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826
(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

3. And most importantly, Output bundles

Please provide the output bundles of the modules by running the scenario, then click the white speech bubble on the top-right of each module and select “Download output bundles”.
Screenshot_2023-10-06_141025

A.

Save the bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

Uploading it here will look like this:

bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted output bundle in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

2 Likes

Hey AnujP,

thanks for your help. I have tried what you mentioned, but its still not working. I try to describe:

I have added an Array aggregator and selected the 31 Collections:

Than I added the created Array to the Iterator:

When I now open the Google Sheets Module It shows me all Entrys of the Array (but the first 3 doesn’t have any Entrys for “Datum” and “Ereignis”):

I need to Add for Column A =>Datum and for Column B => Ereignis so the Process goes through all of the 31 Entrys and creates for each an row and place the right information. But it is not working, because the Iterator doesnt run through all of the 31 Entrys - it runs only 1 time:

The Iterator shows the correct amount of entries:

But in the Google Excel Sheet only 1 Row has been added:

Any Idea what I am doing worng? Please help.

Thanks

Found the Solution.

The JSON provided from OPEN AI was wrong and that was the reason why the JSON Parser created a wrong output. Found the solution in the documentation:

CleanShot 2024-02-03 at 16.54.27

So I Changed the way the JSON is created in the Prompt:

"… Here is an example of how the JSON file should always be structured:
[
{“Date”: “…”,“Event”: “…”},
{“Date”: “…”,“Event”: “…”},

{“Date”: “…”,“Event”: “…”}
]
"

Now its creating Bundles:

Oh man, cost me 3 hours to find this solution. Thanks for helping.

2 Likes

Hi @weooo_GmbH welcome to the community :wave:

I’m just quickly jumping in to say awesome work getting this up and running with the assistance of @AnujP and @samliew :clap:

Thanks a lot for circling back here and sharing how you managed to resolve this. This is super valuable and has the potential of helping many others who are looking for similar information :pray:

2 Likes