# Review contract risk and rewrite clauses with Groq: n8n workflow

> Started by an event in a connected app, and works across Google Drive, Notion and Slack. It hands the judgement calls to Groq.

Source: https://millionrounds.com/workflow/review-contract-risk-and-rewrite-clauses-with-groq (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)

# Review contract risk and rewrite clauses with Groq

Started by an event in a connected app, and works across Google Drive, Notion and Slack. It hands the judgement calls to Groq. 25 steps, 3 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: Groq

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Freview-contract-risk-and-rewrite-clauses-with-groq)

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

**3** Branches: places the flow splits

**1** Loop or waits

**3** Services it connects to

## The flow

Starts it 1 Model 9 Logic 10 Service 5

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

- 1 **Groq Chat Model3** Lm Chat Groq *Model*
- 2 **Structured Output Parser3** Output Parser Structured *Model*
- 3 **Groq Chat Model4** Lm Chat Groq *Model*
- 4 **Structured Output Parser4** Output Parser Structured *Model*
- 5 **Trigger – Contract Upload** Google Drive trigger *Starts it*
- 6 **Parse Rewritten Clause Output** Output Parser Structured *Model*
- 7 **LLM** Lm Chat Groq *Model*
- 8 **Extract Contract Clauses** Chain Llm *Model*
- 9 **AI Risk Analysis & Executive Report** Chain Llm *Model*
- 10 **Download File** Google Drive *Service*
- 11 **AI Rewrite Risky Clauses** Chain Llm *Model*
- 12 **Merge Vendor + Standards** Merge *Logic*
- 13 **Prepare Clause Comparison Dataset** Code *Logic*
- 14 **Check if PDF** If *Logic*
- 15 **Loop Through Clauses** Split In Batches *Logic*
- 16 **Compare Vendor vs Standard Clauses** Code *Logic*
- 17 **Extract content from PDF** Extract From File *Service*
- 18 **Extract Content** Code *Logic*
- 19 **Combine All Revised Clauses** Code *Logic*
- 20 **Check If Clause Needs Rewrite** If *Logic*
- 21 **Fetch Standard Clauses** Notion *Service*
- 22 **Format Final Contract Review Record** Set *Logic*
- 23 **Check If Contract Is Risky** If *Logic*
- 24 **Send Slack Risk Alert** Slack *Service*
- 25 **Create Contract Review Record** Notion *Service*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 25, with 3 branches, 1 loop or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Drive, Notion, Slack
- **Model:** Groq

## Questions

What does it need to run?

An n8n account, plus your own Google Drive, Notion and Slack accounts, and a key for Groq. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls Groq. 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%2Freview-contract-risk-and-rewrite-clauses-with-groq)
- **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.

[Google Drive](https://millionrounds.com/workflows?service=Google+Drive#library)[Notion](https://millionrounds.com/workflows?service=Notion#library)[Slack](https://millionrounds.com/workflows?service=Slack#library)

## Workflows like it

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

- [**Document RAG & chat agent: Google Drive to Qdrant with Mistral** 25 steps · calls a model · Google Drive, Qdrant](https://millionrounds.com/workflow/document-rag-and-chat-agent-google-drive-to-qdrant-with-mist)
- [**Extract text from Google Drive files to Google Sheets** 25 steps · Google Docs, Google Drive](https://millionrounds.com/workflow/extract-text-from-google-drive-files-to-google-sheets)
- [**Nightly n8n backup to Google Drive** 25 steps · Google Drive](https://millionrounds.com/workflow/nightly-n8n-backup-to-google-drive)
- [**Audit contract governance risk with OpenAI and Slack** 24 steps · calls a model · Email, Slack](https://millionrounds.com/workflow/audit-contract-governance-risk-with-openai-and-slack)
- [**Automate document ingestion & RAG system with Google Drive** 24 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/automate-document-ingestion-and-rag-system-with-google-drive)
- [**Chat with Ollama and Supabase Vector DB** 26 steps · calls a model · Google Drive, Supabase](https://millionrounds.com/workflow/chat-with-ollama-and-supabase-vector-db)
