{"product_id":"ecommerce-risk-inventory-automation-with-claude-postgres-slack","title":"Ecommerce Risk \u0026 Inventory Automation with Claude, Postgres \u0026 Slack","description":"\u003ch3\u003eAutomate e-commerce risk and inventory actions with Claude—plus full audit trails in Postgres and Slack updates\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow automatically receives e-commerce order-risk and inventory\/pricing events, gathers supporting evidence from your commerce APIs, asks \u003cstrong\u003eAnthropic Claude\u003c\/strong\u003e to recommend an action with a confidence score, and then \u003cstrong\u003eoptionally auto-executes low-risk decisions\u003c\/strong\u003e—while logging every step to \u003cstrong\u003ePostgres\u003c\/strong\u003e and notifying the right \u003cstrong\u003eSlack\u003c\/strong\u003e channel.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIngests events via webhook\u003c\/strong\u003e: accepts a POST webhook event (or a manual test event) and applies shared configuration such as API base URL, lookback window, thresholds, and Slack channel IDs.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNormalizes and classifies the payload\u003c\/strong\u003e: determines whether the incoming data is an \u003cstrong\u003eorder-risk\u003c\/strong\u003e event or an \u003cstrong\u003einventory\/pricing\u003c\/strong\u003e event, then routes to the appropriate evidence-gathering path.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFetches evidence from commerce APIs\u003c\/strong\u003e:\n    \u003cul\u003e\n      \u003cli\u003eFor order risk: retrieves relevant context such as orders and customer\/fraud signals.\u003c\/li\u003e\n      \u003cli\u003eFor inventory\/pricing: retrieves inventory\/pricing history and market data.\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRequests a decision from Claude\u003c\/strong\u003e: sends the event plus evidence to Anthropic Claude and parses the returned JSON decision (recommended action, confidence, risk level, reasoning, Slack message, and an execution payload).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAuto-executes when safe\u003c\/strong\u003e: if confidence meets the threshold and risk is not high, the workflow calls your commerce API to execute; otherwise it skips execution.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAudits and alerts\u003c\/strong\u003e: writes a full audit record (event, evidence snapshot, decision, execution status) to \u003cstrong\u003ePostgres\u003c\/strong\u003e and posts to \u003cstrong\u003eSlack\u003c\/strong\u003e using either an escalation or low-noise log channel.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eAuto-handle suspicious orders: recommend cancellation\/hold actions based on fraud signals and confidence.\u003c\/li\u003e\n  \u003cli\u003ePrevent pricing mistakes: recommend inventory or pricing adjustments using inventory\/pricing history and market data.\u003c\/li\u003e\n  \u003cli\u003eReduce operational overhead: route decisions to Slack and maintain a complete Postgres audit trail for compliance and review.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n workflow logic\u003c\/strong\u003e: uses nodes including \u003cem\u003eif\u003c\/em\u003e, \u003cem\u003eset\u003c\/em\u003e, \u003cem\u003ecode\u003c\/em\u003e, \u003cem\u003emerge\u003c\/em\u003e, \u003cem\u003eslack\u003c\/em\u003e, and \u003cem\u003eswitch\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations\u003c\/strong\u003e: webhook ingestion, \u003cstrong\u003eAnthropic Claude\u003c\/strong\u003e decisioning, commerce API evidence + optional execution, \u003cstrong\u003ePostgres\u003c\/strong\u003e audit logging, and \u003cstrong\u003eSlack\u003c\/strong\u003e notifications.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46019021275315,"sku":"N8N-19548","price":13.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/Ei4YAYnnRrAhognKH8w0__xu8lMSal.png?v=1789376817","url":"https:\/\/buyflowscripts.com\/products\/ecommerce-risk-inventory-automation-with-claude-postgres-slack","provider":"N8N Commerce","version":"1.0","type":"link"}