Google sheets x OpenAI x Google sheets

I have a google sheet with 3 rows: Review, Prompt, Answer. I want my workflow to automatically evaluate row Review based on the provided Prompt and give me feedback in Answer if the review can be submitted or not.

I am struggling to have this process fully automatized. My goal is to add a daily batch of reviews to the Review column and receive an answer in row Answer.

I have connected via API the drive, google sheets and OpenAI. Do you have a suggestion of which functions to use or how to set up my OpenAI settings in the workflow?

Hi @Richard_Parev, welcome to the community!

a google sheet with 3 rows: Review, Prompt, Answer

I am afraid n8n would expect a traditional table structure when working with the Google Sheets node, meaning each item in n8n would correspond to a single row in your Google Sheet with each field being represented by a column.

So in other words, when working with n8n you would want your sheet to look like so:

image

You could then use a workflow like this to have n8n fetch the rows that do not have an answer yet once per day and send the review and prompt values to OpenAI:

Make sure to also set the “When Filter Has Multiple Matches” option on the first Google Sheets node, it appears the forum does not include this in the preview:

image

This workflow will then update your Google Sheet with the responses coming from OpenAI:

Since the initial Google Sheets node in this example only fetches rows with no answer yet, this workflow will process each row only once.

Hope this helps!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.