Skip to product information

n8n Webhook Workflow: Sync Multi-Location Inventory to Medusa

n8n Webhook Workflow: Sync Multi-Location Inventory to Medusa

 (200+Reviews)
Regular price £30.99
Regular price £30.99 Sale price
SAVE Sold out
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
🔥
128+ Sold
Popular with n8n builders
âš¡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
n8n Webhook Workflow: Sync Multi-Location Inventory to Medusa

n8n Webhook Workflow: Sync Multi-Location Inventory to Medusa

Regular price £30.99
Regular price £30.99 Sale price
SAVE Sold out

Sync multi-location inventory to Medusa—automatically via a Webhook

This n8n Webhook Workflow receives a stock feed with SKUs and quantities per stock_location_id, validates and normalizes the payload, then synchronizes absolute inventory levels in Medusa by matching inventory items by SKU. It also returns a clear JSON report of what was synced and what was missing.

What this workflow does

  • Receives stock updates through a POST webhook request containing stock_location_id and an items array (each with sku and stocked_quantity).
  • Validates and normalizes data by converting each incoming item into a consistent row format: sku, stocked_quantity, and stock_location_id.
  • Matches SKUs in Medusa by querying Medusa for an inventory item whose SKU matches the row.
  • Updates per-location inventory: if a matching Medusa inventory item exists, the workflow sets the absolute inventory level for that item at the provided stock_location_id.
  • Reports missing SKUs: if no matching Medusa inventory item is found, it records a not_found result and does not create new inventory records.
  • Responds with a sync report: returns HTTP 200 when all items sync, or HTTP 207 when some SKUs are missing—along with an aggregated JSON sync report.

Use cases

  • Keep Medusa inventory updated from a WMS/ERP that sends SKU quantities per store/warehouse location.
  • Run reliable multi-location stock synchronization whenever a purchase, shipment, or stock adjustment occurs.
  • Automate inventory updates while getting actionable feedback when SKUs are missing in Medusa.

Technical details

  • n8n Webhook (webhook endpoint for medusa-inventory-sync)
  • Medusa integration via Medusa backend URL and an API token/secret
  • Nodes used: if, set, code, merge, webhook, sticky note

Setup note: Configure your Medusa credentials in n8n, use the production webhook URL, and ensure the target Medusa store already contains inventory items for every SKU you plan to send.

View full details