Automation library · Alerts and monitoring

Detect and correct claims cost leakage with OpenAI

Started by a clock, and works across Email and Postgres. It hands the judgement calls to OpenAI. 23 steps, 3 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

23 stepsLarge: read it before trusting it with anything live
3Branches: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 1Model 4Logic 12Service 6

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

  1. 1Daily Claims Analysis ScheduleSchedule triggerStarts it
  2. 2OpenAI GPT-4Lm Chat Open AiModel
  3. 3Classification Output ParserOutput Parser StructuredModel
  4. 4Calculator ToolTool CalculatorModel
  5. 5Workflow ConfigurationSetLogic
  6. 6AI Root Cause ClassifierAgentModel
  7. 7Fetch Historical Claims DataHttp RequestService
  8. 8Generate Corrective AdjustmentsCodeLogic
  9. 9Detect Cost Leakage AnomaliesCodeLogic
  10. 10Aggregate Findings ReportAggregateLogic
  11. 11Route By SeveritySwitchLogic
  12. 12Check If Leakage DetectedIfLogic
  13. 13Send Leakage ReportEmail SendService
  14. 14Check If Requires EscalationIfLogic
  15. 15Aggregate By VendorAggregateLogic
  16. 16Split Anomalies Into ItemsSplit OutLogic
  17. 17No Leakage FoundSetLogic
  18. 18Send Escalation AlertEmail SendService
  19. 19Fetch Vendor HistoryHttp RequestService
  20. 20Fetch Policy RulesHttp RequestService
  21. 21Check Historical PatternsPostgresService
  22. 22Merge Enrichment DataMergeLogic
  23. 23Calculate Risk ScoreCodeLogic

How it's built

Starts on
A clock
Steps
23, with 3 branches
Size
Large: read it before trusting it with anything live
Connects to
Email, Postgres
Model
OpenAI

Questions

What does it need to run?

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

What starts it?

It starts on a clock.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

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