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.

UsesGoogle Sheets

Identify who was paid on every bank feed line

ValuesSet sheetUrl to blank.Set sheetUrl to blank.
ValuesSet feedTab to Bank feed.Set feedTab to Bank feed.
ValuesSet resultsTab to Vendor research.Set resultsTab to Vendor research.
ValuesSet clientName to blank.Set clientName to blank.
ValuesSet clientNotes to blank.Set clientNotes to blank.
ValuesSet maxLinesPerRun to 10.Set maxLinesPerRun to 10.
Dates & TimesGet today's date and save it as checkedOn.Get today's date and save it as checkedOn.
ValuesSet 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].
ValuesSet alreadyChecked to an empty list.Set alreadyChecked to an empty list.
Decisions & LoopsIf a step below fails, save the error as resultsTabErrorIf a step below fails, save the error as resultsTabError
Try
Google SheetsGoogle SheetsRead the rows of sheetUrl. Save it as done.Read the rows of sheetUrl. Save it as done.
Decisions & LoopsIf done.headers is emptyIf done.headers is empty
Yes
Google SheetsGoogle SheetsAdd a row to resultsTab in sheetUrl.Add a row to resultsTab in sheetUrl.
No
No steps
Decisions & LoopsIf 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 line
Yes
Decisions & LoopsStop and report a problem: The 'Vendor research' tab exists but has no 'Bank line' column, so finished lines cannot be told from new ones. Give it these headings, in this order: 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.Stop and report a problem: The 'Vendor research' tab exists but has no 'Bank line' column, so finished lines cannot be told from new ones. Give it these headings, in this order: 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.
No
No steps
Decisions & LoopsFor each doneRow in done.rows:For each doneRow in done.rows:
Text Trim doneRow["Bank line"] and save it as doneLine. Trim doneRow["Bank line"] and save it as doneLine.
Decisions & Loops If doneLine isn't empty and doneLine is not null If doneLine isn't empty and doneLine is not null
Yes
ListsAdd doneLine to the end of alreadyChecked and save it as alreadyChecked.Add doneLine to the end of alreadyChecked and save it as alreadyChecked.
No
No steps
On error
ValuesShow in the output: Could not read the '@resultsTab' tab, so it is being created with its headings.Show in the output: Could not read the '@resultsTab' tab, so it is being created with its headings.
Decisions & LoopsIf a step below fails, save the error as createTabErrorIf a step below fails, save the error as createTabError
Try
Google SheetsGoogle SheetsCreate the tab resultsTab in sheetUrl.Create the tab resultsTab in sheetUrl.
Google SheetsGoogle SheetsAdd a row to resultsTab in sheetUrl.Add a row to resultsTab in sheetUrl.
On error
Decisions & LoopsStop and report a problem: Could not read or create the results tab. Check the spreadsheet address and that Google Sheets is connected, or create the tab yourself with these headings: 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.Stop and report a problem: Could not read or create the results tab. Check the spreadsheet address and that Google Sheets is connected, or create the tab yourself with these headings: 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.
Google SheetsGoogle SheetsRead the rows of sheetUrl. Save it as feed.Read the rows of sheetUrl. Save it as feed.
Decisions & LoopsIf feed.headers is emptyIf feed.headers is empty
Yes
Decisions & LoopsStop and report a problem: The '@feedTab' tab is empty or has no heading row. Paste the bank feed into it with the headings Date, Description and Amount in its first row, or put the name of the tab that holds the feed into the 'feedTab' step, then run it again.Stop and report a problem: The '@feedTab' tab is empty or has no heading row. Paste the bank feed into it with the headings Date, Description and Amount in its first row, or put the name of the tab that holds the feed into the 'feedTab' step, then run it again.
No
No steps
Decisions & LoopsIf feed.headers doesn't contain DescriptionIf feed.headers doesn't contain Description
Yes
TextJoin feed.headers with , and save it as feedHeadings.Join feed.headers with , and save it as feedHeadings.
Decisions & LoopsStop 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.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.
No
No steps
ValuesSet checked to 0.Set checked to 0.
ValuesSet succeeded to 0.Set succeeded to 0.
ValuesSet failed to 0.Set failed to 0.
ValuesSet skipped to 0.Set skipped to 0.
ValuesSet linesLeft to an empty list.Set linesLeft to an empty list.
Decisions & LoopsFor each line in feed.rows:For each line in feed.rows:
TextTrim line.Description and save it as description.Trim line.Description and save it as description.
Decisions & LoopsIf description is blank or description is nullIf description is blank or description is null
Yes
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
Decisions & LoopsIf alreadyChecked contains descriptionIf alreadyChecked contains description
Yes
ValuesAdd 1 to skipped.Add 1 to skipped.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
Decisions & LoopsIf checked is greater than or equal to maxLinesPerRunIf checked is greater than or equal to maxLinesPerRun
Yes
Decisions & LoopsIf linesLeft doesn't contain descriptionIf linesLeft doesn't contain description
Yes
ListsAdd description to the end of linesLeft and save it as linesLeft.Add description to the end of linesLeft and save it as linesLeft.
No
No steps
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
ValuesAdd 1 to checked.Add 1 to checked.
TextTrim line.Date and save it as dateText.Trim line.Date and save it as dateText.
Decisions & LoopsIf dateText is nullIf dateText is null
Yes
ValuesChange dateText to blank.Change dateText to blank.
No
No steps
TextTrim line.Amount and save it as amountText.Trim line.Amount and save it as amountText.
Decisions & LoopsIf amountText is nullIf amountText is null
Yes
ValuesChange amountText to blank.Change amountText to blank.
No
No steps
ValuesSet hint to blank.Set hint to blank.
Decisions & LoopsIf dateText isn't emptyIf dateText isn't empty
Yes
ValuesChange hint to Dated dateText.Change hint to Dated dateText.
No
No steps
Decisions & LoopsIf amountText isn't emptyIf amountText isn't empty
Yes
ValuesChange hint to hintAmount amountText.Change hint to hintAmount amountText.
No
No steps
Decisions & LoopsIf a step below fails, save the error as lineErrorIf a step below fails, save the error as lineError
Try
WorkflowsRun the Verify 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.
Google SheetsGoogle SheetsAdd a row to resultsTab in sheetUrl.Add a row to resultsTab in sheetUrl.
ValuesAdd 1 to succeeded.Add 1 to succeeded.
On error
Decisions & LoopsIf succeeded is 0If succeeded is 0
Yes
Decisions & LoopsStop 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.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.
No
No steps
ValuesAdd 1 to failed.Add 1 to failed.
ValuesShow in the output: Could not research '@description': lineError.message as text.Show in the output: Could not research '@description': lineError.message as text.
Google SheetsGoogle SheetsAdd a row to resultsTab in sheetUrl.Add a row to resultsTab in sheetUrl.
ListsAdd description to the end of alreadyChecked and save it as alreadyChecked.Add description to the end of alreadyChecked and save it as alreadyChecked.
ListsCount the items in linesLeft and save it as leftCount.Count the items in linesLeft and save it as leftCount.
ValuesSet reportLines to an empty list.Set reportLines to an empty list.
ListsAdd 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.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.
Decisions & LoopsIf leftCount is greater than 0If leftCount is greater than 0
Yes
ListsAdd 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.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.
No
No steps
Decisions & LoopsIf failed is greater than 0If failed is greater than 0
Yes
ListsAdd 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.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.
No
No steps
TextJoin reportLines with a space and save it as runSummary.Join reportLines with a space and save it as runSummary.
Decisions & LoopsIf failed is greater than 0If failed is greater than 0
Yes
Decisions & LoopsStop and report a problem: runSummary.Stop and report a problem: runSummary.
No
No steps
Decisions & LoopsFinish the run: runSummary.Finish the run: runSummary.