How to Sync Shopify Orders and Inventory with n8n (2026 Guide)

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.

The short answer

n8n can sync Shopify in both directions. The Shopify Trigger node sends each new order to your ERP, warehouse, accounting tool or spreadsheet, and the HTTP Request node updates stock through the GraphQL Admin API's inventorySetQuantities mutation. Since 2026, new custom apps are created in Shopify's Dev Dashboard, and inventory mutations need an @idempotent key and use changeFromQuantity.

Key takeaways

  • Use two workflows: orders out of Shopify, inventory into Shopify.
  • n8n's Shopify node handles orders and products; update inventory through the GraphQL Admin API.
  • Deduplicate webhooks by order ID, because Shopify can deliver the same event more than once.
  • Push absolute stock numbers from one source of truth to prevent overselling.
How to Sync Shopify Orders and Inventory with n8n (2026 Guide)

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.

September 25, 2026
By Sifat Kazi · Founder And CEO

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

  1. Trigger: add a Shopify Trigger node and subscribe to the order-created topic, or order-paid if you only want to process paid orders.

  2. 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.

  3. 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.

  4. Split line items with a Split Out node if your warehouse or ERP expects one row per item.

  5. 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.

  6. 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.

  7. 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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

Sources

Get the next one before anyone else

Practical writing on custom software, AI agents and automation — roughly monthly, no filler. Unsubscribe in one click.

No spam, and we never share your address.

Frequently Asked Questions

Yes. n8n's built-in Shopify node covers orders and products, so inventory is updated by calling Shopify's GraphQL Admin API from the HTTP Request node, usually with the inventorySetQuantities mutation.

Yes. The Shopify Trigger node subscribes to Shopify webhook topics, such as new orders, so a workflow starts the moment the event happens in your store.

Shopify can send the same webhook more than once. Deduplicate on the order ID with n8n's Remove Duplicates node or a lookup table, and write the external order ID back to Shopify so both systems can be matched.

Yes, but since 1 January 2026 new custom apps are created in Shopify's Dev Dashboard and then installed on your store, rather than in the Shopify admin. Custom apps created before that date keep working.

In real time through webhooks where your warehouse or ERP supports them. Otherwise, every 5 to 15 minutes suits most stores, and hourly is usually enough for slow-moving catalogs.

Related Insight

WhatsApp CRM Integration: How to Connect WhatsApp to Your CRM (2026)
WhatsApp CRM Integration: How to Connect WhatsApp to Your CRM (2026)

The three ways to connect WhatsApp Business to your CRM, what to automate first, and the 2026 rules and costs, with a step-by-step n8n build.

AI Lead Qualification for Dubai Real Estate: How It Works in 2026
AI Lead Qualification for Dubai Real Estate: How It Works in 2026

How an AI agent replies to every property enquiry in seconds, qualifies buyers on WhatsApp in English or Arabic, and hands hot leads to your brokers.

Best n8n Automation Agencies in 2026: How to Compare and Choose
Best n8n Automation Agencies in 2026: How to Compare and Choose

A transparent comparison of n8n agencies by partner tier, use case, pricing and support, with the questions to ask before you hire.

Leave A Comment

Your email address will not be published. Required fields are marked *

Ready to Your Project?

Let's talk