Turns a name and a company into that person's profile page address, using only pages a web search actually returned.

UsesClaudeGoogle SheetsSerper

Find each person's public profile page

ValuesSet spreadsheetUrl to blank.Set spreadsheetUrl to blank.
ValuesSet peopleSheetName to blank.Set peopleSheetName to blank.
ValuesSet resultsSheetName to blank.Set resultsSheetName to blank.
ValuesSet profileSite to blank.Set profileSite to blank.
ValuesSet maxPeople to 10.Set maxPeople to 10.
TextMake profileSite lowercase and save it as siteHostRaw.Make profileSite lowercase and save it as siteHostRaw.
ListsGet the first item of the last item of 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.
Decisions & LoopsIf siteHost is emptyIf siteHost is empty
Yes
Decisions & LoopsStop and report a problem: 'profileSite' does not look like a web address. Write just the site, for example linkedin.com.Stop and report a problem: 'profileSite' does not look like a web address. Write just the site, for example linkedin.com.
No
No steps
Google SheetsGoogle SheetsRead the rows of spreadsheetUrl. Save it as record.Read the rows of spreadsheetUrl. Save it as record.
ValuesSet recordHeaders to record.headers.Set recordHeaders to record.headers.
ValuesSet recordRows to record.rows.Set recordRows to record.rows.
Decisions & LoopsIf recordHeaders is emptyIf recordHeaders is empty
Yes
Google SheetsGoogle SheetsAdd a row to resultsSheetName in spreadsheetUrl.Add a row to resultsSheetName in spreadsheetUrl.
No
No steps
ValuesSet alreadyLookedUp to an empty list.Set alreadyLookedUp to an empty list.
Decisions & LoopsFor each recordRow in recordRows:For each recordRow in recordRows:
Decisions & LoopsIf a step below fails, save the error as recordErrorIf a step below fails, save the error as recordError
Try
ValuesSet recordKey to recordRow.Name in lowercase @ recordRow.Company in lowercase.Set recordKey to recordRow.Name in lowercase @ recordRow.Company in lowercase.
ListsAdd recordKey to the end of alreadyLookedUp and save it as alreadyLookedUp.Add recordKey to the end of alreadyLookedUp and save it as alreadyLookedUp.
On error
ValuesShow in the output: Ignored a row already on the record that has no Name and Company: recordError as text.Show in the output: Ignored a row already on the record that has no Name and Company: recordError as text.
Google SheetsGoogle SheetsRead the rows of spreadsheetUrl. Save it as people.Read the rows of spreadsheetUrl. Save it as people.
ValuesSet peopleRows to people.rows.Set peopleRows to people.rows.
ValuesSet checkedCount to 0.Set checkedCount to 0.
ValuesSet foundCount to 0.Set foundCount to 0.
Decisions & LoopsFor each person in peopleRows:For each person in peopleRows:
Decisions & LoopsIf checkedCount multiplied by 1 is greater than or equal to maxPeople multiplied…If checkedCount multiplied by 1 is greater than or equal to maxPeople multiplied…
Yes
Decisions & LoopsStop repeating.Stop repeating.
No
No steps
Decisions & LoopsIf a step below fails, save the error as personErrorIf a step below fails, save the error as personError
Try
TextTrim person.Name and save it as personName.Trim person.Name and save it as personName.
TextTrim person.Company and save it as personCompany.Trim person.Company and save it as personCompany.
ValuesSet personKey to personName in lowercase @ personCompany in lowercase.Set personKey to personName in lowercase @ personCompany in lowercase.
Decisions & LoopsIf personName is empty or personCompany is emptyIf personName is empty or personCompany is empty
Yes
ValuesShow in the output: Skipped a row that does not have both a Name and a Company..Show in the output: Skipped a row that does not have both a Name and a Company..
Else if @alreadyLookedUp contains @personKey
ValuesShow in the output: Already on the record, so not looked up again: personKey.Show in the output: Already on the record, so not looked up again: personKey.
Otherwise
ValuesSet searchUsed to @personName @personCompany site:siteHost.Set searchUsed to @personName @personCompany site:siteHost.
SerperSerperSearch Google for searchUsed. Save it as searchResult.Search Google for searchUsed. Save it as searchResult.
ValuesSet hits to searchResult.results.Set hits to searchResult.results.
ValuesSet linkList to an empty list.Set linkList to an empty list.
ValuesSet optionsText to blank.Set optionsText to blank.
Decisions & LoopsFor each hit in hits:For each hit in hits:
Decisions & Loops If a step below fails, save the error as hitError If a step below fails, save the error as hitError
Try
TextTrim hit.link and save it as hitLink.Trim hit.link and save it as hitLink.
Decisions & LoopsIf hitLink is nullIf hitLink is null
Yes
ValuesChange hitLink to blank.Change hitLink to blank.
No
No steps
TextTrim hit.title and save it as hitTitle.Trim hit.title and save it as hitTitle.
Decisions & LoopsIf hitTitle is nullIf hitTitle is null
Yes
ValuesChange hitTitle to blank.Change hitTitle to blank.
No
No steps
TextTrim hit.snippet and save it as hitSnippet.Trim hit.snippet and save it as hitSnippet.
Decisions & LoopsIf hitSnippet is nullIf hitSnippet is null
Yes
ValuesChange hitSnippet to blank.Change hitSnippet to blank.
No
No steps
ValuesSet hitText to hitTitle hitSnippet.Set hitText to hitTitle hitSnippet.
Decisions & LoopsIf hitLink isn't empty and hitText contains personName (ignoring case)If hitLink isn't empty and hitText contains personName (ignoring case)
Yes
ListsAdd hitLink to the end of linkList and save it as linkList.Add hitLink to the end of linkList and save it as linkList.
ValuesChange optionsText to optionsText@hitLink - hitTitleChange optionsText to optionsText@hitLink - hitTitle .
No
No steps
On error
ValuesShow in the output: Skipped a search result that could not be read: hitError as text.Show in the output: Skipped a search result that could not be read: hitError as text.
ValuesSet profileUrl to blank.Set profileUrl to blank.
ValuesSet lookupNote to No page in the search results could be confirmed as this person's own profile, so the Profile URL was left empty..Set lookupNote to No page in the search results could be confirmed as this person's own profile, so the Profile URL was left empty..
Decisions & LoopsIf linkList isn't emptyIf linkList isn't empty
Yes
ValuesSet promptIntro to You are matching one person to their own public profile page.Set promptIntro to You are matching one person to their own public profile page. Person: personName Company: personCompany .
ClaudeClaudeAsk Claude: '@promptIntroBelow are the pages a web search returned, one per line, each with its title.Ask Claude: '@promptIntroBelow are the pages a web search returned, one per line, each with its title. Reply with EXACTLY one address, copied character for character from that list, and only if that page is this person's own profile page at that company. If none of them is, or you cannot tell, reply with the single word NONE. Never write an address that is not in the list. Never guess, complete, shorten or tidy an address. Never build one out of the person's name. Answering NONE is always better than answering with a page that might belong to somebody else. Search results: optionsText'. Save it as verdict. Maximum response length: 200
TextTrim verdict.response_text and save it as candidate.Trim verdict.response_text and save it as candidate.
TextMake candidate lowercase and save it as candidateLower.Make candidate lowercase and save it as candidateLower.
ListsCheck whether linkList includes candidate and save it as cameFromResults.Check whether linkList includes candidate and save it as cameFromResults.
ListsGet the first item of the last item of candidateLower split by :// split by / and save it as candidateHost.Get the first item of the last item of candidateLower split by :// split by / and save it as candidateHost.
ValuesSet hostMatches to candidateHost is siteHost or candidateHost ends with .@siteHost.Set hostMatches to candidateHost is siteHost or candidateHost ends with .@siteHost.
ValuesSet schemeOk to candidateLower starts with https:// or candidateLower starts with http://.Set schemeOk to candidateLower starts with https:// or candidateLower starts with http://.
Decisions & LoopsIf cameFromResults is yes and schemeOk is yes and hostMatches is yesIf cameFromResults is yes and schemeOk is yes and hostMatches is yes
Yes
ValuesChange profileUrl to candidate.Change profileUrl to candidate.
ValuesChange lookupNote to Matched to a page this search returned..Change lookupNote to Matched to a page this search returned..
No
No steps
No
ValuesChange lookupNote to The search returned no page on siteHost that mentions this person by name.Change lookupNote to The search returned no page on siteHost that mentions this person by name.
ValuesSet foundFlag to no.Set foundFlag to no.
Decisions & LoopsIf profileUrl isn't emptyIf profileUrl isn't empty
Yes
ValuesChange foundFlag to yes.Change foundFlag to yes.
ValuesAdd 1 to foundCount.Add 1 to foundCount.
No
No steps
Google SheetsGoogle SheetsAdd a row to resultsSheetName in spreadsheetUrl.Add a row to resultsSheetName in spreadsheetUrl.
ListsAdd personKey to the end of alreadyLookedUp and save it as alreadyLookedUp.Add personKey to the end of alreadyLookedUp and save it as alreadyLookedUp.
ValuesAdd 1 to checkedCount.Add 1 to checkedCount.
On error
ValuesShow in the output: Skipped a row that could not be read: personError as text.Show in the output: Skipped a row that could not be read: personError as text.
ValuesShow in the output: Looked up checkedCount as text people and found a profile page for foundCount as text. Every result is on the '@resultsSheetName' tab.Show in the output: Looked up checkedCount as text people and found a profile page for foundCount as text. Every result is on the '@resultsSheetName' tab.