Reads the official sources you list each day, summarises every new or amended rule, and files a task for each one.
Uses
Claude
Google Sheets
Google Tasks
Jina AI
Turn regulatory updates into tracked tasks
sourcesSheetUrl to blank.Set sourcesSheetUrl to blank.sourcesTabName to Sources.Set sourcesTabName to Sources.taskListName to blank.Set taskListName to blank.maxSourcesPerRun to 10.Set maxSourcesPerRun to 10.maxChangesPerSource to 5.Set maxChangesPerSource to 5.taskLists.List lists. Save it as taskLists.taskListName lowercase and save it as wantedListName.Make taskListName lowercase and save it as wantedListName.taskListId to blank.Set taskListId to blank.taskList in taskLists.task_lists:For each taskList in taskLists.task_lists:taskListErrorIf a step below fails, save the error as taskListErrorTry
taskList.title in lowercase is wantedListNameIf taskList.title in lowercase is wantedListNameYes
taskList.id and save it as taskListId.Trim taskList.id and save it as taskListId.No
No steps
On error
Skipped a task list whose name could not be read..Show in the output: Skipped a task list whose name could not be read..taskListId is emptyIf taskListId is emptyYes
No
No steps
taskListId. Save it as existingTasks.List tasks in Google Tasks list taskListId. Save it as existingTasks.filedTitles to an empty list.Set filedTitles to an empty list.existingTask in existingTasks.tasks:For each existingTask in existingTasks.tasks:existingTaskErrorIf a step below fails, save the error as existingTaskErrorTry
existingTask.title in lowercase to the end of filedTitles and save it as filedTitles.Add existingTask.title in lowercase to the end of filedTitles and save it as filedTitles.On error
Skipped an existing task that has no title..Show in the output: Skipped an existing task that has no title..filedTitles with a new line and save it as alreadyFiled.Join filedTitles with a new line and save it as alreadyFiled.readingRules to:Set readingRules to:You are reading one page published by an official rule-making or regulatory body. List the new or amended rules that this page itself describes.
Rules you must follow exactly:
- Report only what is written on this page. Do not add background, context, or anything you know from elsewhere.
- Do not say whether a change applies to the reader, do not recommend any action, and do not state any legal conclusion. Describe only what the change alters.
- Never invent, infer, estimate or guess a date. Give a date only if this page states one for that change.
- If a detail is not on the page, leave it ...outputFormat to:Set outputFormat to:Output one line per change and nothing else: no heading, no numbering, no blank lines, no closing remarks.
Each line must be four fields separated by the pipe character | in this order. Never use a pipe character inside a field.
1. REFERENCE - the identifier this page prints for the change (its number, citation or short code). If the page prints none, use a short distinctive phrase from the change's own title.
2. TITLE - the change's title, in plain text.
3. EFFECTIVE DATE - the date this page states the change takes effect, written as YYYY-MM-DD. If this page does not state one, write exac...sourcesSheetUrl. Save it as sourcesResult.Read the rows of sourcesSheetUrl. Save it as sourcesResult.source in sourcesResult.rows:For each source in sourcesResult.rows:sourceErrorIf a step below fails, save the error as sourceErrorTry
source["Source Name"] and save it as sourceName.Trim source["Source Name"] and save it as sourceName.source["Page URL"] and save it as pageUrl.Trim source["Page URL"] and save it as pageUrl.rowIsUsable to the length of sourceName is greater than 0 and pageUrl in lowercase starts with http.Set rowIsUsable to the length of sourceName is greater than 0 and pageUrl in lowercase starts with http.rowIsUsable is yesIf rowIsUsable is yesYes
pageUrl with Jina. Save it as page.Read the page at pageUrl with Jina. Save it as page.page.content to 12000 characters and save it as pageText.Shorten page.content to 12000 characters and save it as pageText.pageText isn't emptyIf pageText isn't emptyYes
sourceHeader to Source: sourceNameSet sourceHeader to Source: sourceName
Page: pageUrl.prompt to readingRulesSet prompt to readingRules
outputFormat
sourceHeader
Page text:
pageText.prompt. Save it as reply.Ask Claude: prompt. Save it as reply.
Maximum response length: 1500reply.response_text by a new line and save it as changeLines.Split reply.response_text by a new line and save it as changeLines.filedForSource to 0.Set filedForSource to 0.changeLine in changeLines:For each changeLine in changeLines:filedForSource is greater than or equal to maxChangesPerSource multiplied by 1 If filedForSource is greater than or equal to maxChangesPerSource multiplied by 1Yes
No
No steps
changeError If a step below fails, save the error as changeErrorTry
changeLine by | and save it as parts.Split changeLine by | and save it as parts.parts[0] and save it as reference.Trim parts[0] and save it as reference.parts[1] and save it as changeTitle.Trim parts[1] and save it as changeTitle.parts[2] and save it as effectiveRaw.Trim parts[2] and save it as effectiveRaw.parts[3] and save it as summary.Trim parts[3] and save it as summary.marker to [ref: reference].Set marker to [ref: reference].marker lowercase and save it as markerKey.Make marker lowercase and save it as markerKey.worthFiling to the length of reference is greater than 0 and the length of summary is greater than 0 and alreadyFiled contains markerKey is false.Set worthFiling to the length of reference is greater than 0 and the length of summary is greater than 0 and alreadyFiled contains markerKey is false.worthFiling is yesIf worthFiling is yesYes
effectiveRaw and save it as effectiveDate.Extract the first match from effectiveRaw and save it as effectiveDate.dueValue to blank.Set dueValue to blank.effectiveLine to Effective date: not stated on the source page..Set effectiveLine to Effective date: not stated on the source page..effectiveDate is 10If the length of effectiveDate is 10Yes
dueValue to effectiveDateT00:00:00.000Z.Change dueValue to effectiveDateT00:00:00.000Z.effectiveLine to Effective date stated on the source page: effectiveDate.Change effectiveLine to Effective date stated on the source page: effectiveDate.No
No steps
taskTitle to sourceName truncated to 40 characters: changeTitle truncated to 120 characters marker.Set taskTitle to sourceName truncated to 40 characters: changeTitle truncated to 120 characters marker.notesTop to Source: sourceNameSet notesTop to Source: sourceName
Page: pageUrl.notesRef to Reference as printed by the source: reference.Set notesRef to Reference as printed by the source: reference.notesWhat to What the source says: summary.Set notesWhat to What the source says: summary.notes to notesTopSet notes to notesTop
notesRef
effectiveLine
notesWhat
Filed automatically from the page linked above. This is a summary of what that page says and nothing more - it is not legal advice and does not say whether the change applies to you. Read the source before deciding what it means.taskTitle in Google Tasks list taskListId.Create task taskTitle in Google Tasks list taskListId.
Due date: dueValuenotesalreadyFiled to alreadyFiledChange alreadyFiled to alreadyFiled
markerKey.filedForSource.Add 1 to filedForSource.No
changeLine.Show in the output: Nothing to file for: changeLine.On error
changeLine.Show in the output: Skipped a line that could not be read: changeLine.No
pageUrl.Show in the output: No readable text on the page at pageUrl.No
Skipped a row without a source name or a page link starting with http..Show in the output: Skipped a row without a source name or a page link starting with http..On error
sourceError as text.Show in the output: Skipped a source row that could not be read: sourceError as text.