Data Sync & ETL
Run multi-agent procurement approvals with Anthropic Claude, Slack and Postgres
When you run it, it moves and syncs data with Claude using Postgres, Slack.
What it does
## 🛒 Multi-Agent Procurement System — Planner, Negotiator, Validator & Approval Agents This workflow takes a purchase request and runs it through four specialised Claude agents, with deterministic guardrails and a human-in-the-loop step, then records every offer and the final decision in Postgres. ### Pipeline Purchase Request → Planner Agent → Supplier Loop (Negotiator Agent ⇄ supplier, Validator Agent) → Ranking → Approval Agent → (auto-approve | human approval via Slack | reject) → Postgres audit trail + Slack outcome ### The four agents 1. Planner Agent turns the raw request into a sourcing plan: normalized specs, must-have terms, evaluation criteria, target price, walk-away price, negotiation levers and risk flags. 2. Negotiator Agent runs a multi-round negotiation with each supplier, opening near the target price, conceding gradually and never crossing the walk-away price. 3. Validator Agent audits each negotiated deal (budget, lead time, terms, supplier risk) and is combined with hard-coded policy checks in code. 4. Approval Agent reads the ranked, validated offers and recommends auto_approve, escalate or reject. Code guardrails can override it (an AI can never auto-approve above the spend limit). ### How it works 1. Start it with the Manual Trigger (built-in sample request) or POST a JSON purchase request to the Webhook. 2. Set - Procurement Config holds every policy setting: model, Slack channel, auto-approve limit, negotiation rounds, minimum supplier rating, max risk score. 3. The Planner Agent produces the plan, then one item per supplier enters Loop Over Suppliers. 4. Inside the loop the Negotiator counters, the supplier responds, and the loop repeats until a deal is reached, the agent walks away, or max rounds is hit. 5. The Validator Agent checks the outcome and the offer is upserted into Postgres. 6. When all suppliers are done, offers are scored (price 50%, lead time 20%, rating 20%, risk 10%) and the Approval Agent decides the route. 7. Escalations post Approve / Reject links to Slack and the workflow pauses at a Wait node until someone clicks. ### How to set up 1. Import this workflow into n8n. 2. Add credentials: Postgres, Anthropic API (Header Auth, name x-api-key), Slack API. 3. Run procurement_schema.sql to create the tables (procurement_offers, procurement_decisions). 4. Edit Set - Procurement Config (model, channel, limits). 5. Run t
The steps
- Manual Trigger - Start Request
- Webhook - New Procurement Request
- Set - Procurement Config
- JS - Normalize Procurement Request
- HTTP Request - Claude: Planner Agent
- JS - Parse Procurement Plan
- JS - Split Suppliers
- Loop Over Suppliers
- JS - Prepare Negotiation Round
- HTTP Request - Claude: Negotiator Agent
- JS - Parse Negotiation & Supplier Response
- IF - Negotiation Finished?
- HTTP Request - Claude: Validator Agent
- JS - Parse Validation
29 steps in total.
Similar automations
Email AutomationRun procurement approvals with Google Sheets, Gmail, Google Docs, and Slack32 stepsAI Agents & AssistantsScore supplier risk and route approvals with OpenAI, Slack and ERP data57 stepsData Sync & ETLGuard AI agent Postgres writes using OpenAI, FirstHelm, and Slack approvals25 stepsTasks & Project ManagementReview agency asset readiness and approvals from Google Sheets and Gmail21 steps