Never Run Out of Stock: n8n Sync for Shopify/Amazon & NetSuite
Build an n8n workflow to sync Shopify and Amazon inventory with NetSuite, auto-create POs and notify suppliers via email or API.
Why connect Shopify/Amazon to NetSuite with n8n
Retail and DTC teams lose sales and waste cash when channels and ERP stock counts diverge. Manually reconciling Shopify, Amazon, and NetSuite is slow, error-prone, and scales poorly as SKUs grow or sales spikes occur.
Using n8n as the orchestration layer lets you centralize logic: detect low stock from multiple sales channels, decide replenishment quantities based on rules, and push purchase orders to NetSuite while notifying suppliers automatically. The result is fewer stockouts, lower carrying costs, and faster replenishment cycles.
Technical overview of the n8n workflow
At a high level the workflow runs on a schedule or reacts to channel events: ingest order and inventory changes from Shopify (webhook or API), ingest FBA and marketplace sales from Amazon (SP-API or reports), aggregate committed stock and available-on-hand, then evaluate reorder rules per SKU (min/max, safety stock, lead time).
When a SKU falls below its reorder point the flow constructs a purchase order payload and calls NetSuite's API to create or update a PO (or SuiteScript endpoint). After PO creation the workflow sends supplier notifications via SMTP (Email node) or an HTTP Request node to supplier APIs, and writes audit entries to a log or database.
Key implementation details include API auth (OAuth for Shopify, AWS signing or SP-API for Amazon, NetSuite token-based auth), rate limit handling (queueing and backoff), idempotency checks to avoid duplicate POs, and robust error handling with retries and alerting nodes.
Step-by-step n8n implementation (practical actions)
Start with triggers: use Shopify webhooks for order/inventory updates and a scheduled node to poll Amazon inventory and sales reports. Normalize incoming data with Function or Set nodes to produce a canonical record: SKU, marketplace, sold qty, on-hand, reserved, lead time, supplier ID.
Aggregate sales and commitments (GroupBy or custom JavaScript) and compute reorder quantities using defined business rules (min/max, EOQ, vendor minimums). Add an IF node to check whether reorderQty > 0 and whether an open PO already exists (query NetSuite via HTTP Request or use a dedicated NetSuite node).
When creating a PO compose the NetSuite payload (vendor, items, quantities, expected delivery) and call the create-PO endpoint. On success, trigger downstream actions: update channel notes or tags (Shopify/ Amazon), send supplier notification (Email node for SMTP or HTTP Request for supplier API), and persist transaction details to a ledger or Slack channel for visibility.
Before and after: operational impact and ROI
Before automation teams manually run reports, compare CSVs, and submit purchase orders by email or portal. This process creates delays (hours or days), duplicate orders, and frequent stockouts during peak demand—leading to lost revenue and poor customer experience.
After implementing the n8n workflow you reduce reorder cycle time from days to minutes, cut human hours spent on reconciliation, and lower emergency expedited freight spend. Typical KPIs improve: stockout rate drops, order fulfillment time shortens, and carrying costs fall; many businesses see payback within a few months from reduced lost sales and headcount reallocation.
Best practices, monitoring and next steps
Deploy gradually: test in sandbox NetSuite and Shopify test stores, run workflows in dry-run mode to log proposed POs without creating them, and add reconciliation jobs to compare expected vs actual NetSuite POs. Implement monitoring: success/failure alerts (Slack or email), metrics dashboards for PO volume and error rates, and retention of raw payloads for debugging.
Operationalize security and maintainability: store credentials securely in n8n credentials, use idempotency keys and deduplication to prevent duplicates, version workflows in Git where possible, and schedule regular reviews of reorder parameters and lead times. Once stable, extend the workflow to handle partial shipments, multiple suppliers, and automated supplier acknowledgements via API to further reduce manual touchpoints.