Takes a full-page picture of each page you list, reads the details you asked for off the picture, and adds a row per page to your sheet.
Uses
Google Sheets
OpenAI
ScreenshotOne
Read details off web pages that won't share their text
pageUrls to blank.Set pageUrls to blank.fieldsToRead to blank.Set fieldsToRead to blank.spreadsheetUrl to blank.Set spreadsheetUrl to blank.sheetName to blank.Set sheetName to blank.maxPages to 10.Set maxPages to 10.fieldNames to an empty list.Set fieldNames to an empty list.rawFieldName in fieldsToRead split by ,:For each rawFieldName in fieldsToRead split by ,:rawFieldName and save it as fieldName.Trim rawFieldName and save it as fieldName.fieldName isn't emptyIf fieldName isn't emptyYes
fieldName to the end of fieldNames and save it as fieldNames.Add fieldName to the end of fieldNames and save it as fieldNames.No
No steps
fieldNames is emptyIf fieldNames is emptyYes
No
No steps
blankCells to an empty list.Set blankCells to an empty list.unreadFieldName in fieldNames:For each unreadFieldName in fieldNames: to the end of blankCells and save it as blankCells.Add to the end of blankCells and save it as blankCells.capturedOn.Get today's date and save it as capturedOn.pagesCaptured to 0.Set pagesCaptured to 0.rowsWritten to 0.Set rowsWritten to 0.rawPageUrl in pageUrls with "For each rawPageUrl in pageUrls with
replaced by , split by ,:rawPageUrl and save it as pageUrl.Trim rawPageUrl and save it as pageUrl.pageUrl is emptyIf pageUrl is emptyYes
No
No steps
pagesCaptured is greater than or equal to maxPages multiplied by 1If pagesCaptured is greater than or equal to maxPages multiplied by 1Yes
No
No steps
pagesCaptured.Add 1 to pagesCaptured.problemNote to blank.Set problemNote to blank.pictureRef to blank.Set pictureRef to blank.pageUrl doesn't start with https:// and pageUrl doesn't start with http://If pageUrl doesn't start with https:// and pageUrl doesn't start with http://Yes
problemNote to This is not a web address. Give the page as a full address starting with https://..Change problemNote to This is not a web address. Give the page as a full address starting with https://..No
captureErrorIf a step below fails, save the error as captureErrorTry
pictureRef.Trim the document ref from the ScreenshotOne “Take a screenshot” step and save it as pictureRef.On error
pageUrl: captureError as text.Show in the output: Could not photograph pageUrl: captureError as text.pictureRef to blank.Change pictureRef to blank.pictureRef doesn't start with doc_If pictureRef doesn't start with doc_Yes
problemNote to No picture of this page could be taken. Check the address opens in a browser without signing in..Change problemNote to No picture of this page could be taken. Check the address opens in a browser without signing in..No
No steps
readFields to an empty list.Set readFields to an empty list.problemNote is emptyIf problemNote is emptyYes
readErrorIf a step below fails, save the error as readErrorTry
pictureReading.Run an AI agent: Read the attached picture of a web page and pull out each of these fields, in this order:… and save it as pictureReading.readFields to pictureReading.output.fields.Change readFields to pictureReading.output.fields.On error
pageUrl: readError as text.Show in the output: Could not read the picture of pageUrl: readError as text.readFields to an empty list.Change readFields to an empty list.problemNote to The picture was taken but nothing could be read off it..Change problemNote to The picture was taken but nothing could be read off it..No
No steps
rowValues to [capturedOn, pageUrl].Set rowValues to [capturedOn, pageUrl].filledCells to 0.Set filledCells to 0.wantedField in fieldNames:For each wantedField in fieldNames:cellValue to blank.Set cellValue to blank.readField in readFields:For each readField in readFields:readFieldName to blank.Set readFieldName to blank.unnamedFieldIf a step below fails, save the error as unnamedFieldTry
readField.name and save it as readFieldName.Trim readField.name and save it as readFieldName.On error
readFieldName to blank.Change readFieldName to blank.readFieldName is wantedFieldIf readFieldName is wantedFieldYes
valueIsAListIf a step below fails, save the error as valueIsAListTry
readField.value and save it as cellValue.Trim readField.value and save it as cellValue.On error
readField.value with , and save it as cellValue.Join readField.value with , and save it as cellValue.No
No steps
cellValue isn't emptyIf cellValue isn't emptyYes
filledCells.Add 1 to filledCells.No
No steps
cellValue to the end of rowValues and save it as rowValues.Add cellValue to the end of rowValues and save it as rowValues.problemNote is empty and filledCells is 0If problemNote is empty and filledCells is 0Yes
problemNote to The picture was read but none of the details you asked for are on this page..Change problemNote to The picture was read but none of the details you asked for are on this page..No
No steps
problemNote to the end of rowValues and save it as rowValues.Add problemNote to the end of rowValues and save it as rowValues.sheetName in spreadsheetUrl.Add a row to sheetName in spreadsheetUrl.rowsWritten.Add 1 to rowsWritten.rowsWritten as text of pagesCaptured as text pages looked at.Show in the output: Rows written: rowsWritten as text of pagesCaptured as text pages looked at.