Runs your property search on Google for one site each week and logs every result page you have not seen, with its title and any price.
Uses
Claude
Google Sheets
Serper
Log new property search results from one site each week
searchQuery to blank.Set searchQuery to blank.listingSite to blank.Set listingSite to blank.marketName to blank.Set marketName to blank.spreadsheetUrl to blank.Set spreadsheetUrl to blank.listingsSheetName to Search results.Set listingsSheetName to Search results.summarySheetName to Weekly summary.Set summarySheetName to Weekly summary.maxNewListings to 15.Set maxNewListings to 15.resultsToScan to 20.Set resultsToScan to 20.listingLinkContains to blank.Set listingLinkContains to blank.listingsSheetName is blankIf listingsSheetName is blankYes
listingsSheetName to Search results.Change listingsSheetName to Search results.No
No steps
summarySheetName is blankIf summarySheetName is blankYes
summarySheetName to Weekly summary.Change summarySheetName to Weekly summary.No
No steps
listingSite lowercase and save it as siteHostRaw.Make listingSite lowercase and save it as siteHostRaw.siteHostRaw split by :// split by / and save it as siteHost.Get the first item of the last item of siteHostRaw split by :// split by / and save it as siteHost.siteHost is emptyIf siteHost is emptyYes
No
No steps
spreadsheetUrl. Save it as record.Read the rows of spreadsheetUrl. Save it as record.recordHeaders to record.headers.Set recordHeaders to record.headers.recordRows to record.rows.Set recordRows to record.rows.recordHeaders is emptyIf recordHeaders is emptyYes
listingsSheetName in spreadsheetUrl.Add a row to listingsSheetName in spreadsheetUrl.No
No steps
seenLinks to an empty list.Set seenLinks to an empty list.recordRow in recordRows:For each recordRow in recordRows:recordErrorIf a step below fails, save the error as recordErrorTry
recordRow.Link in lowercase to the end of seenLinks and save it as seenLinks.Add recordRow.Link in lowercase to the end of seenLinks and save it as seenLinks.On error
recordError as text.Show in the output: Ignored a row already on the record that has no Link column: recordError as text.searchUsed to searchQuery site:siteHost.Set searchUsed to searchQuery site:siteHost.searchUsed. Save it as search.Search Google for searchUsed. Save it as search.hits to search.results.Set hits to search.results.newCount to 0.Set newCount to 0.alreadyCount to 0.Set alreadyCount to 0.offSiteCount to 0.Set offSiteCount to 0.newSummary to blank.Set newSummary to blank.notListingCount to 0.Set notListingCount to 0.hitLimit to false.Set hitLimit to false.hit in hits:For each hit in hits:newCount multiplied by 1 is greater than or equal to maxNewListings multiplied…If newCount multiplied by 1 is greater than or equal to maxNewListings multiplied…Yes
hitLimit to true.Change hitLimit to true.No
No steps
listingErrorIf a step below fails, save the error as listingErrorTry
hit.link and save it as listingLink.Trim hit.link and save it as listingLink.listingLink is nullIf listingLink is nullYes
listingLink to blank.Change listingLink to blank.No
No steps
listingLink is emptyIf listingLink is emptyYes
Skipped a search result that came back with no link..Show in the output: Skipped a search result that came back with no link..No
listingLink lowercase and save it as linkLower.Make listingLink lowercase and save it as linkLower.linkLower split by :// split by / and save it as linkHost.Get the first item of the last item of linkLower split by :// split by / and save it as linkHost.onSite to linkHost is siteHost or linkHost ends with .@siteHost.Set onSite to linkHost is siteHost or linkHost ends with .@siteHost.onSite is yesIf onSite is yesYes
listingLinkContains isn't blank and linkLower doesn't contain…If listingLinkContains isn't blank and linkLower doesn't contain…Yes
notListingCount.Add 1 to notListingCount.Else if @seenLinks contains @linkLower
alreadyCount.Add 1 to alreadyCount.Otherwise
hit.title and save it as listingTitle.Trim hit.title and save it as listingTitle.listingTitle is nullIf listingTitle is nullYes
listingTitle to blank.Change listingTitle to blank.No
No steps
hit.snippet and save it as listingSnippet.Trim hit.snippet and save it as listingSnippet.listingSnippet is nullIf listingSnippet is nullYes
listingSnippet to blank.Change listingSnippet to blank.No
No steps
listingText to listingTitle listingSnippet.Set listingText to listingTitle listingSnippet.listingText and save it as priceAsListed.Extract the first match from listingText and save it as priceAsListed.listingsSheetName in spreadsheetUrl.Add a row to listingsSheetName in spreadsheetUrl.linkLower to the end of seenLinks and save it as seenLinks.Add linkLower to the end of seenLinks and save it as seenLinks.newSummary to newSummary- listingTitle | price as listed: priceAsListedChange newSummary to newSummary- listingTitle | price as listed: priceAsListed
.newCount.Add 1 to newCount.No
offSiteCount.Add 1 to offSiteCount.On error
listingError as text.Show in the output: Skipped a search result that could not be read: listingError as text.listingsOnRecord to the length of recordRows plus newCount.Set listingsOnRecord to the length of recordRows plus newCount.note to Recorded newCount as text new search results for this market; alreadyCount as text results were already on the record.Set note to Recorded newCount as text new search results for this market; alreadyCount as text results were already on the record.newCount multiplied by 1 is greater than 0If newCount multiplied by 1 is greater than 0Yes
notePrompt to You are writing one short note for a record of property search results.Set notePrompt to You are writing one short note for a record of property search results.
Describe only what the search results below say: how many there are, what kinds of property they are, and the prices as they were listed. Quote a figure only if it appears in the text below, written exactly as it is there.
Do not give advice, an opinion, a recommendation or a forecast. Do not say whether anything is cheap, expensive, good value, a bargain, over-priced or worth buying. Do not estimate a value, a yield, a return or a future price. Do not compare these results with any market figure you were not given here. Do not describe the market as rising, falling, hot, slow or recovering.
Write at most four sentences of plain description, and nothing else.
Market: marketName
New search results recorded in this run:
newSummary.noteErrorIf a step below fails, save the error as noteErrorTry
notePrompt. Save it as written.Ask Claude: notePrompt. Save it as written.
Maximum response length: 400written.response_text and save it as noteText.Trim written.response_text and save it as noteText.noteText and save it as noteFigures.Extract all matches from noteText and save it as noteFigures.noteIsClean to true.Set noteIsClean to true.figure in noteFigures:For each figure in noteFigures:newSummary doesn't contain figure If newSummary doesn't contain figureYes
noteIsClean to false.Change noteIsClean to false.No
No steps
noteIsClean is yes and noteText isn't emptyIf noteIsClean is yes and noteText isn't emptyYes
note to noteText.Change note to noteText.No
The written note was left out: it quoted a figure that is not in the listings, or came back empty. The listing rows are unaffected..Show in the output: The written note was left out: it quoted a figure that is not in the listings, or came back empty. The listing rows are unaffected..On error
noteError as text.Show in the output: Could not write the run note: noteError as text.No
No steps
spreadsheetUrl. Save it as summary.Read the rows of spreadsheetUrl. Save it as summary.summaryHeaders to summary.headers.Set summaryHeaders to summary.headers.summaryHeaders is emptyIf summaryHeaders is emptyYes
summarySheetName in spreadsheetUrl.Add a row to summarySheetName in spreadsheetUrl.No
No steps
summarySheetName in spreadsheetUrl.Add a row to summarySheetName in spreadsheetUrl.limitNote to blank.Set limitNote to blank.hitLimit is yesIf hitLimit is yesYes
Stopped at the limit of @maxNewListings new results set in 'maxNewListings'; any others are not recorded this week. and save it as limitNote.Build the text Stopped at the limit of @maxNewListings new results set in 'maxNewListings'; any others are not recorded this week. and save it as limitNote.No
No steps
newCount new search results to the '@listingsSheetName' tab. alreadyCount were already on the record, notListingCount were not listing pages and offSiteCount were not on siteHost.@limitNote.Show in the output: Added newCount new search results to the '@listingsSheetName' tab. alreadyCount were already on the record, notListingCount were not listing pages and offSiteCount were not on siteHost.@limitNote.