Works down your prospect list in Google Sheets, researches each company on the web, and writes a short brief into the row.
Uses
Google Sheets
Perplexity
Research each prospect into an outreach brief
Every six hours, your prospect list in Google Sheets is read and a few companies whose 'Brief' cell is still empty are researched on the web by AI. Each gets a four-line brief written into the row: what the company does, its size and stage, one signal from the last six months, and an opening angle tying that signal to what you sell.
The brief sits next to the account whenever anyone opens the list. The 'Brief' column is the only thing written, and only when it is empty, so nothing is researched twice and nothing you have edited by hand is overwritten; clear a brief and the next run writes it again. A row with no company name is left alone, a tab missing either column is reported, not written into, and a company the research cannot answer for is left for the next run.
Your tab needs 'Brief' as its first column and a 'Company' column; anything else on the row is left as it is. You also describe what you sell and who buys it, so the last line can be an opener.
spreadsheetUrl to blank.Set spreadsheetUrl to blank.sheetName to Prospects.Set sheetName to Prospects.whatWeSell to blank.Set whatWeSell to blank.maxCompaniesPerRun to 10.Set maxCompaniesPerRun to 10.spreadsheetUrl. Save it as sheet.Read the rows of spreadsheetUrl. Save it as sheet.rows to sheet.rows.Set rows to sheet.rows.researchedThisRun to 0.Set researchedThisRun to 0.row in rows:For each row in rows:researchedThisRun is greater than or equal to maxCompaniesPerRunIf researchedThisRun is greater than or equal to maxCompaniesPerRuncompany to blank.Set company to blank.existingBrief to blank.Set existingBrief to blank.columnsFound to false.Set columnsFound to false.columnErrorIf a step below fails, save the error as columnErrorrow.Company and save it as company.Trim row.Company and save it as company.row.Brief and save it as existingBrief.Trim row.Brief and save it as existingBrief.columnsFound to true.Change columnsFound to true.row.row_number as text - this tab needs a 'Brief' column in column A and a 'Company' column. Check the header row.Show in the output: Skipped row row.row_number as text - this tab needs a 'Brief' column in column A and a 'Company' column. Check the header row.columnsFound is yes and company isn't empty and existingBrief is emptyIf columnsFound is yes and company isn't empty and existingBrief is emptyprompt to You are briefing a salesperson before they reach out to a company for the first time. Research the company on the web and write the brief.Set prompt to You are briefing a salesperson before they reach out to a company for the first time. Research the company on the web and write the brief.
What we sell:
whatWeSell
Company to research:
company
Write at most 120 words of plain text. No markdown, no headings, no bullet characters, no preamble - the text goes straight into a spreadsheet cell. Use exactly these four lines, each starting with the label shown:
What they do: who they sell to and how they make money.
Size and stage: employees, funding or revenue stage, and where they are based.
Recent signal: one thing from the last six months - funding, launch, hire, expansion, partnership or a public change - and the month it happened.
Angle: one specific opening line for us, tying that signal to what we sell.
Use only what you can find on the web about this company. If you cannot confirm a line, write 'unknown' for it rather than guessing, and never invent a funding round, a headcount or a customer.brief to blank.Set brief to blank.researchErrorIf a step below fails, save the error as researchErrorprompt. Save it as answer.Ask Perplexity: prompt. Save it as answer.answer.response_text to 1200 characters and save it as brief.Shorten answer.response_text to 1200 characters and save it as brief.company - the row was left for the next run: researchError as text.Show in the output: Could not research company - the row was left for the next run: researchError as text.researchedThisRun.Add 1 to researchedThisRun.brief isn't emptyIf brief isn't emptyrow of sheetName in spreadsheetUrl.Overwrite row row of sheetName in spreadsheetUrl.company - the row was left for the next run.Show in the output: No brief came back for company - the row was left for the next run.researchedThisRun as text company/companies this run.Show in the output: Researched researchedThisRun as text company/companies this run.