Every hour, has ChatGPT write a fresh batch of the list you describe and adds each item as a row in your Google Sheet.

UsesGoogle SheetsOpenAI

Fill a spreadsheet with a ChatGPT-written list every hour

Describe what each item should be - 'quiz questions about world geography, each with its answer and a difficulty from 1 to 5' - and name the columns each item should fill. Every hour the workflow asks ChatGPT for that many items as a JSON array, one object per item with one key per column, reads the reply, and appends one row per item to your Google Sheet: the run's date and time first, then your columns in the order you listed them.

The reply is read defensively: code fences and any wording around the array are ignored, keys are matched whether or not ChatGPT changes their case or spacing, and a value it left out becomes an empty cell rather than a made-up one. Rows are only ever added, and values are written exactly as they arrived so none can become a formula. A reply that is not a list at all fails the run and says why, so an hour with no rows is never mistaken for a quiet one.

Before the first run, give the sheet a header row: 'Generated at' followed by your columns in the same order. Each run asks afresh, so over time similar items can come back; the first step sets how often it runs.

ScheduleRun every hour.Run every hour.
ValuesSet request to blank.Set request to blank.
ValuesSet columns to blank.Set columns to blank.
ValuesSet itemsPerRun to 5.Set itemsPerRun to 5.
ValuesSet spreadsheetUrl to blank.Set spreadsheetUrl to blank.
ValuesSet sheetName to Sheet1.Set sheetName to Sheet1.
ValuesSet prompt to You are producing rows for a spreadsheet.Set prompt to You are producing rows for a spreadsheet. Produce exactly itemsPerRun items. Each item is: request Reply with a JSON array and nothing else: no introduction, no explanation and no Markdown code fences. Every element of the array is a JSON object with exactly these keys, spelled exactly as written and in this order: columns Every value is plain text or a number - never an object or a list, and never left empty. Do not include the same item twice.
OpenAIOpenAIAsk OpenAI: prompt. Save it as answer.Ask OpenAI: prompt. Save it as answer.
CodeRun Python code on reply, columns, items_per_run, and generated_at and save it as parsed.Run Python code on reply, columns, items_per_run, and generated_at and save it as parsed.
ValuesSet rows to parsed.rows.Set rows to parsed.rows.
Decisions & LoopsIf rows is emptyIf rows is empty
Yes
Decisions & LoopsStop and report a problem: No rows were added. parsed.problem.Stop and report a problem: No rows were added. parsed.problem.
No
No steps
ValuesSet rowsAdded to 0.Set rowsAdded to 0.
Decisions & LoopsFor each row in rows:For each row in rows:
Decisions & LoopsIf a step below fails, save the error as sheetErrorIf a step below fails, save the error as sheetError
Try
Google SheetsGoogle SheetsAdd a row to sheetName in spreadsheetUrl.Add a row to sheetName in spreadsheetUrl.
ValuesAdd 1 to rowsAdded.Add 1 to rowsAdded.
On error
Decisions & LoopsStop and report a problem: Added rowsAdded of the length of rows row(s) to '@sheetName' before Google Sheets refused one. The remaining items from this batch were not added; once the sheet or its link is fixed, the next run adds a fresh batch. Google Sheets said: sheetError.message.Stop and report a problem: Added rowsAdded of the length of rows row(s) to '@sheetName' before Google Sheets refused one. The remaining items from this batch were not added; once the sheet or its link is fixed, the next run adds a fresh batch. Google Sheets said: sheetError.message.
ValuesShow in the output: Added rowsAdded row(s) to '@sheetName'.Show in the output: Added rowsAdded row(s) to '@sheetName'.
Decisions & LoopsIf parsed.note isn't emptyIf parsed.note isn't empty
Yes
ValuesShow in the output: parsed.note.Show in the output: parsed.note.
No
No steps