Multiple GPT Requests To Single G-Sheet Row

Hi @mr-oodler,

I’m not at a PC right now, I’m on my mobile. But I think I can still point you in the right direction.

—-

—-

You have two options:

  1. As you stated you could create multiple ChatGPT requests to have it output them separately, currently there is no way to track chat history, so you could simply in your next prompt reference the previous one by adding the result from the previous one

(e.g., inside the prompt where it pops up the options to insert previous pieces, click the little arrows beside the ChatGPT piece and reference that result, (assuming you only output the title and no system message)).

I believe you could also achieve the same result using Put/Get inside storage pieces, although, I feel that is overkill if doing the separately.

  1. You mentioned you are asking ChatGPT to output it in JSON format, after this you will need to add a code piece. In the key:value boxes at the top of the code piece you can enter title as the key, then for the value, the ChatGPT result, then you can parse it via code. Then there is also a piece that allows you to convert JSON to CSV and vice versa, in theory, Sheets uses CSV, so on pasting it should import correctly in multiple cells. You would likely also need a loop to iterate those values.

Note: if you take the separate approach you can output multiple Chat GPT results into the same output box. By this I mean the arrow pointing to the title in the second screenshot for the update row, you could put the result of each separate chat in here and separate them by commas, new lines, or even add your own text (these boxes work the same way as adding your prompt in the ChatGPT piece).

However, see the below reply, I think it will solve that part for you along with issue 2.

@ashrafsam made a great example flow demonstrating this part:

Hopefully, this helps, if not I can take a look when I get back from work this evening.

Kind regards