# Route legal contract risks with OpenAI and Slack: n8n workflow

> Started by another system calling it, and works across n8n data table. It puts OpenAI behind a retrieval step, so answers are drawn from documents you...

Source: https://millionrounds.com/workflow/route-legal-contract-risks-with-openai-and-slack (Millionrounds; every figure on the page links to its filing or article)

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

# Route legal contract risks with OpenAI and Slack

Started by another system calling it, and works across n8n data table. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 25 steps, 2 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Froute-legal-contract-risks-with-openai-and-slack)

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

**2** Branches: places the flow splits

**0** Loops or waits

**1** Service it connects to

## The flow

Starts it 1 Model 8 Logic 10 Service 6

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

- 1 **Contract Upload Webhook** Webhook *Starts it*
- 2 **Governance Model** Lm Chat Open Ai *Model*
- 3 **Contract Review Memory** Memory Buffer Window *Model*
- 4 **Structured Output Parser** Output Parser Structured *Model*
- 5 **Contract Review Model** Lm Chat Open Ai *Model*
- 6 **Compliance Model** Lm Chat Open Ai *Model*
- 7 **Regulatory Database Tool** Http Request Tool *Service*
- 8 **Slack Alert Tool** Slack Tool *Service*
- 9 **Extract Contract Text** Extract From File *Service*
- 10 **Legal Governance Agent** Agent *Model*
- 11 **Contract Review Agent** Agent Tool *Model*
- 12 **Compliance Validation Agent** Agent Tool *Model*
- 13 **Route by Risk Level** Switch *Logic*
- 14 **Prepare Critical Alert** Set *Logic*
- 15 **Prepare High Risk Alert** Set *Logic*
- 16 **Prepare Standard Review** Set *Logic*
- 17 **Prepare Audit Record** Set *Logic*
- 18 **Track Contract Reviews** Data Table *Service*
- 19 **Split Risk Clauses** Split Out *Logic*
- 20 **Check Approval Required** If *Logic*
- 21 **Prepare Risk Clause Record** Set *Logic*
- 22 **Prepare Approval Log** Set *Logic*
- 23 **Prepare Final Summary** Set *Logic*
- 24 **Store Risk Clauses** Data Table *Service*
- 25 **Log Approval Decision** Data Table *Service*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 25, with 2 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** n8n data table
- **Model:** OpenAI
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

An n8n account, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

Yes. It calls OpenAI. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 25 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 25 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%2Froute-legal-contract-risks-with-openai-and-slack)
- **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.

## Connects to

Each opens the other workflows that use it.

[n8n data table](https://millionrounds.com/workflows?service=n8n+data+table#library)

## Workflows like it

Also documents and files, with the same services where possible, closest in size first.

- [**Translate PDFs into multiple languages with Google Translate** 20 steps · Gmail, n8n data table](https://millionrounds.com/workflow/translate-pdfs-into-multiple-languages-with-google-translate)
- [**AI knowledge assistant with Gemini and OpenAI** 32 steps · calls a model · Google Drive, Pinecone](https://millionrounds.com/workflow/ai-knowledge-assistant-with-gemini-and-openai)
- [**Restore n8n workflows from GitHub JSON backups** 17 steps · GitHub, n8n data table](https://millionrounds.com/workflow/restore-n8n-workflows-from-github-json-backups)
- [**Assess blockchain smart contract and tokenomics risk** 15 steps · calls a model · Gmail, n8n data table](https://millionrounds.com/workflow/assess-blockchain-smart-contract-and-tokenomics-risk)
- [**Chase missing onboarding documents daily with Google Drive** 15 steps · Gmail, Google Drive](https://millionrounds.com/workflow/chase-missing-onboarding-documents-daily-with-google-drive)
- [**Upload files to Dropbox and generate direct download links** 14 steps · Dropbox, n8n data table](https://millionrounds.com/workflow/upload-files-to-dropbox-and-generate-direct-download-links)
