Reads every page you list, pulls out the details you asked for with AI, and adds one row per page to your sheet.
Uses
Google Sheets
Jina AI
OpenAI
Turn a list of web pages into spreadsheet rows
Give it a list of web pages and the details you want off each one, and run it. Every page is fetched once, exactly as you listed it, and read as clean text, then an AI step pulls out the details you asked for and they are written across one row per page in your Google Sheet.
You end up with one appended row per page: the page address first, then your details in the order you listed them, with 'n/a' wherever the page does not say. Nothing crawls, follows links or wanders onto other pages. Values are written exactly as extracted, so nothing off a page can turn into a spreadsheet formula, and rows are only ever added, so running it again with a new list never disturbs what is already there. A page that will not load, or that comes back with no readable text, is named in the run log and the remaining pages carry on.
Before the first run you need a sheet whose header row reads 'Page' followed by your fields in the same order, since the workflow cannot name the columns for you.
pageUrls to blank.Set pageUrls to blank.fieldsToExtract to blank.Set fieldsToExtract to blank.spreadsheetUrl to blank.Set spreadsheetUrl to blank.sheetName to Sheet1.Set sheetName to Sheet1.maxPageCharacters to 12000.Set maxPageCharacters to 12000.columnSeparator to |||.Set columnSeparator to |||.pageUrls by , and save it as pages.Split pageUrls by , and save it as pages.rowsWritten to 0.Set rowsWritten to 0.pagesWithoutRows to an empty list.Set pagesWithoutRows to an empty list.listedPage in pages:For each listedPage in pages:listedPage and save it as webPage.Trim listedPage and save it as webPage.webPage doesn't start with httpIf webPage doesn't start with httpwebPage to the end of pagesWithoutRows and save it as pagesWithoutRows.Add webPage to the end of pagesWithoutRows and save it as pagesWithoutRows.pageErrorIf a step below fails, save the error as pageErrorwebPage with Jina. Save it as page.Read the page at webPage with Jina. Save it as page.page.content and save it as pageText.Trim page.content and save it as pageText.pageText isn't emptyIf pageText isn't emptyprompt to You are reading one web page and filling in one row of a spreadsheet.Set prompt to You are reading one web page and filling in one row of a spreadsheet.
Pull out these details, in this exact order:
fieldsToExtract
Reply with ONE line and nothing else. Separate the values with columnSeparator in the order listed above. Do not repeat the field names, do not add headings, bullets, numbering or any commentary, and do not wrap values in quotes. Write n/a for anything the page does not say.
Page address: webPage
Page content:
pageText truncated to maxPageCharacters characters.prompt. Save it as extraction.Ask OpenAI: prompt. Save it as extraction.extraction.response_text and save it as answerLine.Trim extraction.response_text and save it as answerLine.webPage] and save it as row.Create a list of [webPage] and save it as row.extractedValue in answerLine split by columnSeparator:For each extractedValue in answerLine split by columnSeparator:extractedValue to the end of row and save it as row. Add extractedValue to the end of row and save it as row.sheetName in spreadsheetUrl.Add a row to sheetName in spreadsheetUrl.rowsWritten.Add 1 to rowsWritten.webPage to the end of pagesWithoutRows and save it as pagesWithoutRows.Add webPage to the end of pagesWithoutRows and save it as pagesWithoutRows.webPage to the end of pagesWithoutRows and save it as pagesWithoutRows.Add webPage to the end of pagesWithoutRows and save it as pagesWithoutRows.pageError as text.Show in the output: Could not read '@webPage': pageError as text.rowsWritten as text row(s) to '@sheetName'.Show in the output: Finished. Wrote rowsWritten as text row(s) to '@sheetName'.pagesWithoutRows isn't emptyIf pagesWithoutRows isn't emptypagesWithoutRows joined by , .Show in the output: No row was written for: pagesWithoutRows joined by , .