Route ecommerce risk and inventory decisions with Claude, Postgres, and Slack
Ready for 3.0What this workflow does
This workflow has 26 nodes and runs when an HTTP POST request hits its webhook URL (plus 1 other trigger). Along the way it connects Postgres and Slack. It also calls api.anthropic.com over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 1 other trigger).
- Set - Config (Edit Fields (Set)): sets 7 fields: commerceApiBaseUrl, anthropicModel, lookbackDays…
- Set - Sample Order Risk Event (Edit Fields (Set)): sets 1 field: body
- Set - Sample Inventory Pricing Event (Edit Fields (Set)): sets 1 field: body
- JS - Normalize & Classify Event (Code): runs custom JavaScript code
- Switch: routes items into 2 branches
- HTTP Request: calls an HTTP API
- HTTP Request: calls an HTTP API
- HTTP Request: calls an HTTP API
- HTTP Request: calls an HTTP API
- HTTP Request: calls an HTTP API
…plus 14 more steps. See the full node list below.
Services it uses
HTTP calls to: api.anthropic.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (10)
- Webhook
n8n-nodes-base.webhook - Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - HTTP Request
n8n-nodes-base.httpRequest - Merge
n8n-nodes-base.merge - If
n8n-nodes-base.if - Postgres
n8n-nodes-base.postgres - Slack
n8n-nodes-base.slack
From the author
Quick overview This workflow receives e-commerce order-risk and inventory/pricing events via a webhook, fetches supporting context from your commerce APIs, asks Anthropic Claude to recommend an action with confidence, optionally auto-executes low-risk…