Automation library · Alerts and monitoring

Analyze contract PDFs and score risk with Claude and Postgres

Started by another system calling it, and works across Gmail, Postgres and Slack. It hands the judgement calls to Claude. 22 steps, 1 branch: large, and worth reading before you trust it with anything live.

LargeCalls a model: Claude

22 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
0Loops or waits
3Services it connects to

The flow

Starts it 1Model 9Logic 5Service 7

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

  1. 1Contract Upload WebhookWebhookStarts it
  2. 2Claude 3.5 ModelLm Chat AnthropicModel
  3. 3Clause ParserOutput Parser StructuredModel
  4. 4Risk ParserOutput Parser StructuredModel
  5. 5Obligation ParserOutput Parser StructuredModel
  6. 6Summary ParserOutput Parser StructuredModel
  7. 7Workflow ConfigurationSetLogic
  8. 8Clause Extraction AgentAgentModel
  9. 9Risk Assessment AgentAgentModel
  10. 10Obligation Extraction AgentAgentModel
  11. 11Executive Summary AgentAgentModel
  12. 12Extract PDF TextExtract From FileService
  13. 13Merge Analysis ResultsMergeLogic
  14. 14Calculate Risk ScoreCodeLogic
  15. 15Prepare Contract DataSetLogic
  16. 16Insert ContractPostgresService
  17. 17Insert ClausesPostgresService
  18. 18Insert ObligationsPostgresService
  19. 19Insert Risk ScoringPostgresService
  20. 20Check Risk LevelIfLogic
  21. 21Send Email AlertGmailService
  22. 22Send Slack AlertSlackService

How it's built

Starts on
Another system calling it
Steps
22, with 1 branch
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Postgres, Slack
Model
Claude

Questions

What does it need to run?

An n8n account, plus your own Gmail, Postgres and Slack accounts, and a key for Claude. 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 Claude. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 22 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 22 steps before you point it at anything that matters.