Automation library · Documents and files

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.

LargeCalls a model: Groq

25 stepsLarge: read it before trusting it with anything live
3Branches: places the flow splits
1Loop or waits
3Services it connects to

The flow

Starts it 1Model 9Logic 10Service 5

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

  1. 1Groq Chat Model3Lm Chat GroqModel
  2. 2Structured Output Parser3Output Parser StructuredModel
  3. 3Groq Chat Model4Lm Chat GroqModel
  4. 4Structured Output Parser4Output Parser StructuredModel
  5. 5Trigger – Contract UploadGoogle Drive triggerStarts it
  6. 6Parse Rewritten Clause OutputOutput Parser StructuredModel
  7. 7LLMLm Chat GroqModel
  8. 8Extract Contract ClausesChain LlmModel
  9. 9AI Risk Analysis & Executive ReportChain LlmModel
  10. 10Download FileGoogle DriveService
  11. 11AI Rewrite Risky ClausesChain LlmModel
  12. 12Merge Vendor + StandardsMergeLogic
  13. 13Prepare Clause Comparison DatasetCodeLogic
  14. 14Check if PDFIfLogic
  15. 15Loop Through ClausesSplit In BatchesLogic
  16. 16Compare Vendor vs Standard ClausesCodeLogic
  17. 17Extract content from PDFExtract From FileService
  18. 18Extract ContentCodeLogic
  19. 19Combine All Revised ClausesCodeLogic
  20. 20Check If Clause Needs RewriteIfLogic
  21. 21Fetch Standard ClausesNotionService
  22. 22Format Final Contract Review RecordSetLogic
  23. 23Check If Contract Is RiskyIfLogic
  24. 24Send Slack Risk AlertSlackService
  25. 25Create Contract Review RecordNotionService

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.