Each week, searches the legal source you name for your research question and records each decision's court, date and outcome in a sheet.

UsesClaudeGoogle SheetsJina AISerper

Keep a sheet of new court decisions on your research question

Once a week, your standing research question is searched on the one legal website you name, each decision found there is opened, and what the page states is copied into a row of your spreadsheet. It is a research aid, not legal advice, and it never says what a case means or how it applies.

You end up with one row per case in a 'Case notes' tab: case name, citation, court, decision date, the outcome as the page states it, a quoted passage, the source address and a note of what the page did not say. Only pages on the site you named are ever opened. Anything the page does not state is left empty, never guessed, and the quoted passage is checked against the text actually fetched: if those words are not on the page, the quote and outcome are emptied and the row says so. Cases already recorded are skipped, and each run reads a capped number of pages.

Before the first run you need a spreadsheet with a 'Case notes' tab, a research question, and the host name of the one site to read.

ScheduleRun every 7 days.Run every 7 days.
ValuesSet sheetUrl to blank.Set sheetUrl to blank.
ValuesSet researchQuestion to blank.Set researchQuestion to blank.
ValuesSet sourceHost to blank.Set sourceHost to blank.
ValuesSet recordsTab to Case notes.Set recordsTab to Case notes.
ValuesSet maxCasesPerRun to 5.Set maxCasesPerRun to 5.
TextMake sourceHost lowercase and save it as hostRaw.Make sourceHost lowercase and save it as hostRaw.
TextReplace http:// with in hostRaw with https:// replaced by and save it as hostNoScheme.Replace http:// with in hostRaw with https:// replaced by and save it as hostNoScheme.
ListsGet the first item of hostNoScheme split by / and save it as host.Get the first item of hostNoScheme split by / and save it as host.
Decisions & LoopsIf host is emptyIf host is empty
Yes
Decisions & LoopsStop and report a problem: The 'sourceHost' step does not look like a website address. Enter just the host, exactly as it appears in that site's own web addresses - for example 'www.bailii.org'.Stop and report a problem: The 'sourceHost' step does not look like a website address. Enter just the host, exactly as it appears in that site's own web addresses - for example 'www.bailii.org'.
No
No steps
ValuesSet urlPrefix to https://@host/.Set urlPrefix to https://@host/.
Dates & TimesGet today's date and save it as recordedOn.Get today's date and save it as recordedOn.
ListsStart an empty list and save it as alreadyRecorded.Start an empty list and save it as alreadyRecorded.
Decisions & LoopsIf a step below fails, save the error as recordsTabErrorIf a step below fails, save the error as recordsTabError
Try
Google SheetsGoogle SheetsRead the rows of sheetUrl. Save it as done.Read the rows of sheetUrl. Save it as done.
Decisions & LoopsFor each doneRow in done.rows:For each doneRow in done.rows:
Text Trim doneRow.Source and save it as doneSource. Trim doneRow.Source and save it as doneSource.
Decisions & Loops If doneSource in lowercase starts with https:// If doneSource in lowercase starts with https://
Yes
ListsAdd doneSource to the end of alreadyRecorded and save it as alreadyRecorded.Add doneSource to the end of alreadyRecorded and save it as alreadyRecorded.
No
No steps
On error
ValuesShow in the output: Could not read the 'Case notes' tab, so this run treated it as empty. If that tab does not exist yet, create it..Show in the output: Could not read the 'Case notes' tab, so this run treated it as empty. If that tab does not exist yet, create it..
SerperSerperSearch Google for '@researchQuestion site:host'. Save it as found.Search Google for '@researchQuestion site:host'. Save it as found.
ValuesSet recorded to 0.Set recorded to 0.
Decisions & LoopsFor each result in found.results:For each result in found.results:
Decisions & LoopsIf recorded multiplied by 1 is greater than or equal to maxCasesPerRun multiplied…If recorded multiplied by 1 is greater than or equal to maxCasesPerRun multiplied…
Yes
Decisions & LoopsStop repeating.Stop repeating.
No
No steps
TextTrim result.link and save it as link.Trim result.link and save it as link.
Decisions & LoopsIf link in lowercase doesn't start with urlPrefixIf link in lowercase doesn't start with urlPrefix
Yes
ValuesShow in the output: Skipped link - it is not on the site named in the 'sourceHost' step.Show in the output: Skipped link - it is not on the site named in the 'sourceHost' step.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
Decisions & LoopsIf alreadyRecorded contains linkIf alreadyRecorded contains link
Yes
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
ValuesAdd 1 to recorded.Add 1 to recorded.
Decisions & LoopsIf a step below fails, save the error as resultErrorIf a step below fails, save the error as resultError
Try
Jina AIJina AIRead the page at link with Jina. Save it as page.Read the page at link with Jina. Save it as page.
TextTrim page.content and save it as pageText.Trim page.content and save it as pageText.
Decisions & LoopsIf the length of pageText is less than 400If the length of pageText is less than 400
Yes
ValuesShow in the output: Nothing was recorded for link - the page had no readable text. It will be tried again on the next run.Show in the output: Nothing was recorded for link - the page had no readable text. It will be tried again on the next run.
No
ValuesSet pageSection to PAGE TEXT - this is the only material you may use:Set pageSection to PAGE TEXT - this is the only material you may use: pageText truncated to 16000 characters.
ValuesSet prompt to You are copying details out of one page of legal material into a record. You have the text of that page and nothing else.Set prompt to You are copying details out of one page of legal material into a record. You have the text of that page and nothing else. Answer with EXACTLY six values separated by ||| and nothing else - no labels, no numbering, no preamble. 1. The name of the case, as the page gives it. 2. The citation, as the page gives it. 3. The court, as the page names it. 4. The date of the decision, as the page gives it. 5. What the page states the outcome was, in one sentence, in the page's own terms. 6. One passage from the page, copied word for word and character for character, that carries the outcome you gave in value 5. Copy it exactly - do not tidy it, shorten it, join its lines or change its punctuation. Rules you must follow, without exception: - Use only the page text below. Do not use anything you know about this case, this court, or this area of law from anywhere else. - If the page does not state something, write exactly NOT STATED for that value. A missing value is a correct answer; an invented one is not. Never produce a citation, a date or a court name that does not appear in the text below. - Do not say what the case means, what it establishes, how it applies to anyone, or what a court would do. Report only what this page states. - Do not write advice of any kind. pageSection.
ClaudeClaudeAsk Claude: prompt. Save it as reply.Ask Claude: prompt. Save it as reply. Maximum response length: 900
TextTrim reply.response_text and save it as answer.Trim reply.response_text and save it as answer.
TextSplit answer by ||| and save it as parts.Split answer by ||| and save it as parts.
Decisions & LoopsIf the length of parts is less than 6If the length of parts is less than 6
Yes
ValuesShow in the output: Nothing was recorded for link - the reading step did not answer in the expected form. Nothing was recorded, and it will be tried again on the next run.Show in the output: Nothing was recorded for link - the reading step did not answer in the expected form. Nothing was recorded, and it will be tried again on the next run.
No
TextTrim parts[0] and save it as caseName.Trim parts[0] and save it as caseName.
Decisions & LoopsIf caseName is null or caseName in lowercase is not statedIf caseName is null or caseName in lowercase is not stated
Yes
ValuesChange caseName to blank.Change caseName to blank.
No
No steps
TextTrim parts[1] and save it as citation.Trim parts[1] and save it as citation.
Decisions & LoopsIf citation is null or citation in lowercase is not statedIf citation is null or citation in lowercase is not stated
Yes
ValuesChange citation to blank.Change citation to blank.
No
No steps
TextTrim parts[2] and save it as court.Trim parts[2] and save it as court.
Decisions & LoopsIf court is null or court in lowercase is not statedIf court is null or court in lowercase is not stated
Yes
ValuesChange court to blank.Change court to blank.
No
No steps
TextTrim parts[3] and save it as decided.Trim parts[3] and save it as decided.
Decisions & LoopsIf decided is null or decided in lowercase is not statedIf decided is null or decided in lowercase is not stated
Yes
ValuesChange decided to blank.Change decided to blank.
No
No steps
TextTrim parts[4] and save it as outcome.Trim parts[4] and save it as outcome.
Decisions & LoopsIf outcome is null or outcome in lowercase is not statedIf outcome is null or outcome in lowercase is not stated
Yes
ValuesChange outcome to blank.Change outcome to blank.
No
No steps
TextTrim parts[5] and save it as quote.Trim parts[5] and save it as quote.
Decisions & LoopsIf quote is null or quote in lowercase is not statedIf quote is null or quote in lowercase is not stated
Yes
ValuesChange quote to blank.Change quote to blank.
No
No steps
ValuesSet notStated to blank.Set notStated to blank.
ValuesSet integrity to blank.Set integrity to blank.
ListsStart an empty list and save it as missing.Start an empty list and save it as missing.
Decisions & LoopsIf caseName is emptyIf caseName is empty
Yes
ListsAdd the case name to the end of missing and save it as missing.Add the case name to the end of missing and save it as missing.
No
No steps
Decisions & LoopsIf citation is emptyIf citation is empty
Yes
ListsAdd the citation to the end of missing and save it as missing.Add the citation to the end of missing and save it as missing.
No
No steps
Decisions & LoopsIf court is emptyIf court is empty
Yes
ListsAdd the court to the end of missing and save it as missing.Add the court to the end of missing and save it as missing.
No
No steps
Decisions & LoopsIf decided is emptyIf decided is empty
Yes
ListsAdd the decision date to the end of missing and save it as missing.Add the decision date to the end of missing and save it as missing.
No
No steps
Decisions & LoopsIf outcome is emptyIf outcome is empty
Yes
ListsAdd the outcome to the end of missing and save it as missing.Add the outcome to the end of missing and save it as missing.
No
No steps
Decisions & LoopsIf missing isn't emptyIf missing isn't empty
Yes
ValuesChange notStated to The page did not state: missing joined by , .Change notStated to The page did not state: missing joined by , .
No
No steps
ValuesSet verified to false.Set verified to false.
Decisions & LoopsIf the length of quote is greater than or equal to 25If the length of quote is greater than or equal to 25
Yes
TextCheck whether pageText contains quote (ignoring case) and save it as verified.Check whether pageText contains quote (ignoring case) and save it as verified.
No
No steps
Decisions & LoopsIf verified is noIf verified is no
Yes
ValuesChange quote to blank.Change quote to blank.
ValuesChange outcome to blank.Change outcome to blank.
ValuesChange integrity to The outcome column was left empty: no passage in the page's own text could be found to support it. Open the Source link and read the decision itself..Change integrity to The outcome column was left empty: no passage in the page's own text could be found to support it. Open the Source link and read the decision itself..
No
No steps
TextTrim notStated integrity and save it as notes.Trim notStated integrity and save it as notes.
Google SheetsGoogle SheetsAdd a row to recordsTab in sheetUrl.Add a row to recordsTab in sheetUrl.
On error
ValuesShow in the output: Nothing was recorded for link this time; it will be tried again on the next run.Show in the output: Nothing was recorded for link this time; it will be tried again on the next run.