Researches each new line on a client's bank feed sheet and writes who was paid, what they do and where to post it, with sources.
Uses
Google Sheets
Identify who was paid on every bank feed line
Point it at the Google Sheet that holds a client's bank feed and run it. Every line that has not been looked into yet is handed to the vendor verifier, which searches the live web for the business or person behind it and reads the vendor's own page, and what it finds lands as one row on a 'Vendor research' tab: status, vendor, website, what they do, the likely reason, a suggested account, the independent check's verdict, the summary, the evidence, the sources and a question for the client.
The feed is never edited and finished lines are skipped on the next run. If the very first line of a run cannot be researched, usually because the verifier is not set up yet, the run stops and says why, and nothing is written. A line that fails later is recorded as 'Could not research' and the run ends as failed. A feed tab without a Description column stops the run with a note of what it needs. Each run is capped so the cost stays predictable, and its last message says how many lines are still waiting.
You need Google Sheets connected, and the 'Verify the vendor behind a bank or card line' workflow imported and chosen in this one's 'Run a workflow' step, with Serper, Exa and OpenAI connected for it. When you add it, give the sheet's link, the client's name and the client's notes; import a fresh copy for each client.
sheetUrl to blank.Set sheetUrl to blank.feedTab to Bank feed.Set feedTab to Bank feed.resultsTab to Vendor research.Set resultsTab to Vendor research.clientName to blank.Set clientName to blank.clientNotes to blank.Set clientNotes to blank.maxLinesPerRun to 10.Set maxLinesPerRun to 10.checkedOn.Get today's date and save it as checkedOn.headings to [Checked on, Bank line, Date, Amount, Status, Vendor, Website, What they do, Likely reason, Suggested account, Confidence, Independent check, Summary, Evidence, Sources, Ask the client].Set headings to [Checked on, Bank line, Date, Amount, Status, Vendor, Website, What they do, Likely reason, Suggested account, Confidence, Independent check, Summary, Evidence, Sources, Ask the client].alreadyChecked to an empty list.Set alreadyChecked to an empty list.resultsTabErrorIf a step below fails, save the error as resultsTabErrorsheetUrl. Save it as done.Read the rows of sheetUrl. Save it as done.done.headers is emptyIf done.headers is emptyresultsTab in sheetUrl.Add a row to resultsTab in sheetUrl.done.headers isn't empty and done.headers doesn't contain Bank lineIf done.headers isn't empty and done.headers doesn't contain Bank linedoneRow in done.rows:For each doneRow in done.rows:doneRow["Bank line"] and save it as doneLine. Trim doneRow["Bank line"] and save it as doneLine.doneLine isn't empty and doneLine is not null If doneLine isn't empty and doneLine is not nulldoneLine to the end of alreadyChecked and save it as alreadyChecked.Add doneLine to the end of alreadyChecked and save it as alreadyChecked.createTabErrorIf a step below fails, save the error as createTabErrorresultsTab in sheetUrl.Create the tab resultsTab in sheetUrl.resultsTab in sheetUrl.Add a row to resultsTab in sheetUrl.sheetUrl. Save it as feed.Read the rows of sheetUrl. Save it as feed.feed.headers is emptyIf feed.headers is emptyfeed.headers doesn't contain DescriptionIf feed.headers doesn't contain Descriptionfeed.headers with , and save it as feedHeadings.Join feed.headers with , and save it as feedHeadings.feedHeadings. Rename the column that holds the bank's wording for each line to Description (Date and Amount are used too when the tab has them), then run it again.Stop and report a problem: The '@feedTab' tab has no column headed Description, so there is no bank line to research. Its headings are: feedHeadings. Rename the column that holds the bank's wording for each line to Description (Date and Amount are used too when the tab has them), then run it again.checked to 0.Set checked to 0.succeeded to 0.Set succeeded to 0.failed to 0.Set failed to 0.skipped to 0.Set skipped to 0.linesLeft to an empty list.Set linesLeft to an empty list.line in feed.rows:For each line in feed.rows:line.Description and save it as description.Trim line.Description and save it as description.description is blank or description is nullIf description is blank or description is nullalreadyChecked contains descriptionIf alreadyChecked contains descriptionskipped.Add 1 to skipped.checked is greater than or equal to maxLinesPerRunIf checked is greater than or equal to maxLinesPerRunlinesLeft doesn't contain descriptionIf linesLeft doesn't contain descriptiondescription to the end of linesLeft and save it as linesLeft.Add description to the end of linesLeft and save it as linesLeft.checked.Add 1 to checked.line.Date and save it as dateText.Trim line.Date and save it as dateText.dateText is nullIf dateText is nulldateText to blank.Change dateText to blank.line.Amount and save it as amountText.Trim line.Amount and save it as amountText.amountText is nullIf amountText is nullamountText to blank.Change amountText to blank.hint to blank.Set hint to blank.dateText isn't emptyIf dateText isn't emptyhint to Dated dateText.Change hint to Dated dateText.amountText isn't emptyIf amountText isn't emptyhint to hintAmount amountText.Change hint to hintAmount amountText.lineErrorIf a step below fails, save the error as lineErrorVerify the vendor behind a bank or card line workflow with bankLine, whatYouKnow, clientName, and clientNotes and save it as result.Run the Verify the vendor behind a bank or card line workflow with bankLine, whatYouKnow, clientName, and clientNotes and save it as result.resultsTab in sheetUrl.Add a row to resultsTab in sheetUrl.succeeded.Add 1 to succeeded.succeeded is 0If succeeded is 0lineError.message). Nothing was written for it, so it is tried again on the next run. If the message says the workflow to run is missing, open this workflow's 'Run a workflow' step and choose 'Verify the vendor behind a bank or card line'; that workflow needs Serper, Exa and OpenAI connected.Stop and report a problem: Stopped before writing anything: '@description' could not be researched and recorded (lineError.message). Nothing was written for it, so it is tried again on the next run. If the message says the workflow to run is missing, open this workflow's 'Run a workflow' step and choose 'Verify the vendor behind a bank or card line'; that workflow needs Serper, Exa and OpenAI connected.failed.Add 1 to failed.lineError.message as text.Show in the output: Could not research '@description': lineError.message as text.resultsTab in sheetUrl.Add a row to resultsTab in sheetUrl.description to the end of alreadyChecked and save it as alreadyChecked.Add description to the end of alreadyChecked and save it as alreadyChecked.linesLeft and save it as leftCount.Count the items in linesLeft and save it as leftCount.reportLines to an empty list.Set reportLines to an empty list.succeeded new line(s) and wrote them to the '@resultsTab' tab; skipped line(s) were already there. to the end of reportLines and save it as reportLines.Add Researched succeeded new line(s) and wrote them to the '@resultsTab' tab; skipped line(s) were already there. to the end of reportLines and save it as reportLines.leftCount is greater than 0If leftCount is greater than 0leftCount more line(s) are waiting: each run checks at most maxLinesPerRun, so run it again for the rest. to the end of reportLines and save it as reportLines.Add leftCount more line(s) are waiting: each run checks at most maxLinesPerRun, so run it again for the rest. to the end of reportLines and save it as reportLines.failed is greater than 0If failed is greater than 0failed line(s) could not be researched and are on the tab as 'Could not research' with the reason; delete such a row to have that line tried again. to the end of reportLines and save it as reportLines.Add failed line(s) could not be researched and are on the tab as 'Could not research' with the reason; delete such a row to have that line tried again. to the end of reportLines and save it as reportLines.reportLines with a space and save it as runSummary.Join reportLines with a space and save it as runSummary.failed is greater than 0If failed is greater than 0runSummary.Stop and report a problem: runSummary.runSummary.Finish the run: runSummary.