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.

Run every hour.Run every hour.
Set request to blank.Set request to blank.
Set columns to blank.Set columns to blank.
Set itemsPerRun to 5.Set itemsPerRun to 5.
Set spreadsheetUrl to blank.Set spreadsheetUrl to blank.
Set sheetName to “Sheet1”.Set sheetName to “Sheet1”.
Set 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.
Run 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.
Set rows to parsed.rows.Set rows to parsed.rows.
If rows is emptyIf rows is empty
Yes
Stop and report a problem: No rows were added. parsed.problem.Stop and report a problem: No rows were added. parsed.problem.
No
No steps
Set rowsAdded to 0.Set rowsAdded to 0.
For each row in rows:For each row in rows:
If 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.
Add 1 to rowsAdded.Add 1 to rowsAdded.
On error
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.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.
Show in the output: Added rowsAdded row(s) to '@sheetName'.Show in the output: Added rowsAdded row(s) to '@sheetName'.
If parsed.note isn't emptyIf parsed.note isn't empty
Yes
Show in the output: parsed.note.Show in the output: parsed.note.
No
No steps