# Public legal documents & case research automation + AI document: n8n workflow

> Started by a clock. It calls services over plain HTTP rather than through connectors. 39 steps, 4 branches: large, and worth reading before you trust it...

Source: https://millionrounds.com/workflow/public-legal-documents-and-case-research-automation-ai-docum (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Research and reporting](https://millionrounds.com/workflows?category=Research+and+reporting#library)

# Public legal documents & case research automation + AI document

Started by a clock. It calls services over plain HTTP rather than through connectors. 39 steps, 4 branches: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fpublic-legal-documents-and-case-research-automation-ai-docum)

**39 steps** Large: read it before trusting it with anything live

**4** Branches: places the flow splits

**0** Loops or waits

**0** Services by connector: it calls them over plain HTTP

## The flow

Starts it 2 Logic 17 Service 20

The steps in the order they run, from what starts it.

- 1 **Schedule Trigger** Schedule trigger *Starts it*
- 2 **Manual Trigger** Manual trigger *Starts it*
- 3 **Merge Triggers** Merge *Logic*
- 4 **Generate Multi-Source Queries** Code *Logic*
- 5 **Route by Source** Switch *Logic*
- 6 **Search PACER/Federal** Http Request *Service*
- 7 **Search CourtListener** Http Request *Service*
- 8 **Search Google Custom** Http Request *Service*
- 9 **Aggregate Sources** Aggregate *Logic*
- 10 **Parse & Normalize Results** Code *Logic*
- 11 **Check for Duplicates** Http Request *Service*
- 12 **Is New Document?** If *Logic*
- 13 **Download Document** Http Request *Service*
- 14 **Skip Duplicate** No Op *Logic*
- 15 **Extract Text & Metadata** Http Request *Service*
- 16 **Classify Document Type** Http Request *Service*
- 17 **Parse Classification** Code *Logic*
- 18 **Extract Named Entities** Http Request *Service*
- 19 **Link Entities to Knowledge Graph** Code *Logic*
- 20 **Extract Legal Citations** Http Request *Service*
- 21 **Build Citation Network** Code *Logic*
- 22 **Generate Embeddings** Http Request *Service*
- 23 **Generate Legal Summary** Http Request *Service*
- 24 **Calculate Document Score** Code *Logic*
- 25 **Quality Gate** If *Logic*
- 26 **Store Document** Http Request *Service*
- 27 **Rejected - Log** Http Request *Service*
- 28 **Store Entities** Http Request *Service*
- 29 **Store Citation Network** Http Request *Service*
- 30 **Store Vector Embedding** Http Request *Service*
- 31 **Find Related Documents** Http Request *Service*
- 32 **Create Relationships** Http Request *Service*
- 33 **Check Alert Conditions** Code *Logic*
- 34 **Should Send Alert?** If *Logic*
- 35 **Continue Processing** No Op *Logic*
- 36 **Send Alert** Http Request *Service*
- 37 **Aggregate All Documents** Aggregate *Logic*
- 38 **Generate Insights Report** Code *Logic*
- 39 **Send Daily Report** Http Request *Service*

## How it's built

- **Starts on:** A clock
- **Steps:** 39, with 4 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Nothing by connector; it calls services over plain HTTP
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Take your time. At 39 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 39 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fpublic-legal-documents-and-case-research-automation-ai-docum)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Workflows like it

Also research and reporting, with the same services where possible, closest in size first.

- [**Analyze Google Ads competitors with OpenRouter and OpenAI** 39 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/analyze-google-ads-competitors-with-openrouter-and-openai)
- [**Automated WhatsApp group weekly team reports with Gemini** 40 steps · calls a model](https://millionrounds.com/workflow/automated-whatsapp-group-weekly-team-reports-with-gemini)
- [**Summarise Slack channel activity for weekly reports** 40 steps · calls a model · Slack](https://millionrounds.com/workflow/summarise-slack-channel-activity-for-weekly-reports)
- [**Advanced multi-source AI research with Bright Data and OpenAI** 37 steps · calls a model · Email, Redis](https://millionrounds.com/workflow/advanced-multi-source-ai-research-with-bright-data-and-opena)
- [**Nested PDF analysis with Mistral and OneDrive** 41 steps · calls a model · n8n data table](https://millionrounds.com/workflow/nested-pdf-analysis-with-mistral-and-onedrive)
- [**Optimize multi-property rents and analytics with OpenAI** 37 steps · calls a model · Gmail](https://millionrounds.com/workflow/optimize-multi-property-rents-and-analytics-with-openai)
