
How to Sync Shopify Orders and Inventory with n8n (2026 Guide)
Two workflows that send Shopify orders to your ERP or warehouse and keep stock levels accurate, updated for Shopify's 2026 API changes.
Overselling, orders re-typed into a warehouse portal, and stock counts that drift between Shopify, your ERP and your marketplaces are some of the most expensive manual jobs in e-commerce. This guide shows how to automate both directions with n8n: new orders out of Shopify, and stock levels back in. It includes the Shopify platform changes from 2026 that many older tutorials miss.
Can n8n sync Shopify orders and inventory?
Yes. n8n can receive Shopify orders the moment they're placed through its Shopify Trigger node, send them to your ERP, warehouse, accounting tool or spreadsheet, and write stock levels back to Shopify through the GraphQL Admin API using the HTTP Request node. A reliable two-way sync usually uses two workflows: one for orders going out of Shopify and one for inventory coming in.
n8n's built-in Shopify node covers orders and products (create, get, update and delete). Inventory quantities aren't one of its operations, which is why the inventory half of the sync calls Shopify's API directly.
What you need before you start
A Shopify app with Admin API access. Since 1 January 2026, new custom apps can't be created from the Shopify admin; you build them in Shopify's Dev Dashboard and install them on your store. Custom apps created before that date keep working.
The right access scopes: read_orders and read_products for the order workflow, and read_inventory, write_inventory and read_locations for the inventory workflow.
n8n on n8n Cloud or self-hosted, with a public HTTPS address so Shopify can deliver webhooks.
The system that holds your stock: an ERP, warehouse management system, 3PL portal, POS or, for small catalogs, a Google Sheet.
Matching SKUs in every system. The sync is only as good as the identifier it matches on.
Workflow 1: send new Shopify orders to your other systems
Trigger: add a Shopify Trigger node and subscribe to the order-created topic, or order-paid if you only want to process paid orders.
Remove duplicates: Shopify can deliver the same webhook more than once and doesn't guarantee the order of deliveries. Add a Remove Duplicates node set to skip items processed in previous executions, keyed on the order ID.
Map the fields: use an Edit Fields node to shape what the destination needs: order number, customer, shipping address, line items with SKU and quantity, totals and tax.
Split line items with a Split Out node if your warehouse or ERP expects one row per item.
Send the order: use a native n8n node where one exists (for example Google Sheets, Airtable, QuickBooks Online, Xero or HubSpot) or the HTTP Request node for an ERP or 3PL API.
Write the reference back: add the external order ID to the Shopify order as a tag with the Shopify node's order update operation, so both systems can be matched later.
Alert on failure: connect an Error Trigger workflow that posts to Slack or email with the order number, so nothing fails silently.
Workflow 2: update Shopify inventory from your warehouse or ERP
Trigger: use a webhook from your warehouse or ERP when stock changes. If it can't send webhooks, use a Schedule Trigger every 5 to 15 minutes to read current stock from its API, an SFTP file or a sheet.
Look up Shopify IDs: inventory updates need each SKU's inventory item ID and the Shopify location ID. Look them up once with a GraphQL query and store the SKU-to-ID mapping in an n8n data table or a sheet, so you don't repeat the lookup on every run.
Set the quantity: send the inventorySetQuantities mutation to the GraphQL Admin API with an HTTP Request node (POST to your store's /admin/api/{version}/graphql.json endpoint, with your access token in the X-Shopify-Access-Token header). Send several items per call rather than one request per SKU.
Check the response: read the userErrors field and route any errors to your alert workflow.
A minimal request body looks like this:
mutation SetStock($input: InventorySetQuantitiesInput!) {
inventorySetQuantities(input: $input) @idempotent(key: "run-123-sku-ABC") {
inventoryAdjustmentGroup { reason changes { name delta } }
userErrors { field message }
}
}
{
"input": {
"name": "available",
"reason": "correction",
"quantities": [
{
"inventoryItemId": "gid://shopify/InventoryItem/123",
"locationId": "gid://shopify/Location/456",
"quantity": 42,
"changeFromQuantity": null
}
]
}
}Two 2026 API changes matter here. From API version 2026-04, inventory mutations require the @idempotent directive with a unique key, so a retried request can't apply the same change twice; in n8n, build the key from the execution ID and the SKU. The same version removed the old compareQuantity and ignoreCompareQuantity fields in favour of changeFromQuantity: pass the quantity you expect to replace to guard against conflicting updates, or null to set the value without a check.
How to avoid overselling
Pick one source of truth for stock. Usually that's the warehouse or ERP for on-hand quantities, while Shopify stays the source of truth for orders.
Set absolute quantities, don't add and subtract in two places. Pushing the true number from the source of truth avoids drift from missed or duplicated events.
Use changeFromQuantity for fast sellers. If a sale happens between reading and writing stock, the update fails safely instead of overwriting it, and the next run corrects it.
Map each warehouse to a Shopify location if you ship from more than one place.
Keep a small safety buffer on items that also sell on marketplaces or in stores.
Other Shopify workflows worth automating with n8n
Low-stock and sold-out alerts to Slack or email, with a suggested reorder quantity.
Order, shipping and delivery updates to customers by WhatsApp or email.
Paid orders posted to Xero or QuickBooks with the right tax codes.
Stock and orders synced with marketplaces such as Amazon or Noon.
Daily sales and inventory summaries for the team, written by an AI step.
n8n or a Shopify app?
Choose | When |
|---|---|
A Shopify app | A ready-made connector exists for your exact ERP, warehouse or 3PL, and your rules are standard. |
n8n | You connect several systems, need custom rules (bundles, multi-location, marketplaces), use an in-house or regional system, or want to avoid per-order app fees. |
How long it takes and what it costs
A one-direction order sync to a standard tool usually goes live in 2–5 business days. A two-way order and inventory sync across several locations and systems, with monitoring, typically takes 1–3 weeks. At Ryven, single-workflow projects typically cost $1,000–$5,000 and multi-workflow systems $5,000–$15,000. See our n8n pricing guide, our n8n automation services and our e-commerce development work, or read why manual processes cost mid-market e-commerce brands so much.



