Sync CourtListener docket activity to Notion every hour

By General Input

Mirror new filings, orders, and motions from every case you track into a Notion case tracker, hands free.

Integrations

  • CourtListener
  • Notion

Type

Deterministic Code

Categories

  • Operations

Every hour on the hour, mirror new CourtListener docket activity into our Notion "Case Tracker" database. This is a deterministic feed-to-database sync with no summarization or AI judgement: I just want the court record copied into Notion exactly once per filing.

At the top of the workflow, expose the configuration as workflow variables so I can edit them without changing code:

1) A list of CourtListener docket IDs to track. 2) The Notion database ID of the Case Tracker database. 3) A per-docket watermark variable storing the date_created of the most recent docket entry we have already synced for that docket. Default each watermark to empty so the first run can backfill or pick a sensible starting date.

Trigger: cron, every hour on the hour.

For each tracked docket ID, run this sequence:

Step 1: Call CourtListener Get Docket for that docket ID to fetch case metadata. Hold onto case_name, docket_number, court, and absolute_url. We will reuse them on every Notion row for this docket.

Step 2: Call CourtListener List Docket Entries scoped to that docket, ordered by -date_filed, and filtered so date_created is strictly greater than the saved watermark for this docket. Paginate until there are no more results. Collect the new entries in chronological order (oldest new entry first) so we write them into Notion in the order they were filed.

Step 3: For each new docket entry, call Notion Create a Page as a child of the Case Tracker database, with these properties: Case Name (title) = case_name from Get Docket; Docket Number (rich_text) = docket_number; Court (rich_text) = court; Entry Date (date) = date_filed; Entry Number (number) = entry_number; Document Description (rich_text) = description; CourtListener URL (url) = https://www.courtlistener.com plus the docket's absolute_url. Skip rows where required fields are missing rather than failing the run.

Step 4: After all new entries for that docket have been written to Notion successfully, update the per-docket watermark workflow variable to the date_created of the newest entry processed. If any Notion write failed for a given entry, do not advance the watermark past that entry, so the next run retries it. This keeps the sync idempotent and prevents duplicate rows.

Respect CourtListener rate limits: pace requests so we stay under 5 per minute, and if a 429 comes back, honor the Retry-After header before continuing.

Related prompts

Explore more prompts
Screen chartered vessels for AIS gaps and sanctions red flagsCompare candidate store locations with drive time trade areasBrowse every competitor ad and build a Notion swipe fileAudience persona studio for brand and product marketersArtwork desk for the Notion posts still missing an imageShare of voice dashboard for your brand and competitorsInfluencer campaign roster board with AI creator briefsSmart home entity health cockpit for Home AssistantOpen model approval desk for your production AI stackBid board that watches every procurement portal for you