Automation library · E-commerce

Route ecommerce risk and inventory decisions with Claude

Started by another system calling it, and works across Postgres and Slack. 26 steps, 3 branches: large, and worth reading before you trust it with anything live.

Large

26 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 2Logic 13Service 11

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

  1. 1Webhook - New Commerce EventWebhookStarts it
  2. 2Manual Trigger - Test RunManual triggerStarts it
  3. 3Set - ConfigSetLogic
  4. 4Set - Sample Order Risk EventSetLogic
  5. 5Set - Sample Inventory Pricing EventSetLogic
  6. 6JS - Normalize & Classify EventCodeLogic
  7. 7Switch - Route Event TypeSwitchLogic
  8. 8HTTP Request - Fetch Order DetailsHttp RequestService
  9. 9HTTP Request - Fetch Customer HistoryHttp RequestService
  10. 10HTTP Request - Fetch Fraud SignalsHttp RequestService
  11. 11HTTP Request - Fetch SKU InventoryHttp RequestService
  12. 12HTTP Request - Fetch Pricing HistoryHttp RequestService
  13. 13HTTP Request - Fetch Competitor & Supplier FeedHttp RequestService
  14. 14Merge - Combine Order Risk EvidenceMergeLogic
  15. 15Merge - Combine Inventory Pricing EvidenceMergeLogic
  16. 16JS - Build Unified Decision ContextCodeLogic
  17. 17HTTP Request - Claude: Decide ActionHttp RequestService
  18. 18JS - Parse AI DecisionCodeLogic
  19. 19IF - Confidence Meets Auto-Execute ThresholdIfLogic
  20. 20HTTP Request - Execute Action (Auto)Http RequestService
  21. 21Merge - Rejoin Auto & Flagged PathsMergeLogic
  22. 22JS - Finalize Decision RecordCodeLogic
  23. 23Postgres - Log Decision To Audit TablePostgresService
  24. 24IF - High Severity Needs Escalation ChannelIfLogic
  25. 25Slack - Notify Escalation ChannelSlackService
  26. 26Slack - Notify Low-Noise Log ChannelSlackService

How it's built

Starts on
Another system calling it
Steps
26, with 3 branches
Size
Large: read it before trusting it with anything live
Connects to
Postgres, Slack
Model
None. This is plumbing, not judgement

Questions

What does it need to run?

An n8n account, plus your own Postgres and Slack accounts. 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?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

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