Sync inventory from CSV URL
Updates Shopify inventory from a CSV URL using Variant SKU or Handle matching, with optional product-level auto publish and auto unpublish rules.
Setup guide
Before you start
This template reads a CSV URL and updates Shopify inventory for existing products.
Matching modes
Variant SKUmode: best for catalogs with unique SKUsHandlemode: only for single-variant products
Source requirements
- The URL must return raw CSV data
- Google Sheets share/edit URLs are accepted and automatically converted to the CSV export URL
- Blank inventory cells are skipped
- A quantity of
0is treated as a real update and sets that location to zero
Required headers
When Identifier mode is sku:
Variant SKU- one or more
Inventory: Location Namecolumns
When Identifier mode is handle:
Handle- one or more
Inventory: Location Namecolumns
Examples:
Inventory: Sydney WarehouseInventory: Melbourne Warehouse
Multi-location inventory
Use one inventory column per Shopify location. Any non-empty integer value in those columns is synced to that location.
If an inventory item is not yet stocked at a target location, the workflow automatically activates it before retrying the quantity update.
Sample file
Publishing behavior
Optional auto publish and auto unpublish rules work at the product level. After a successful inventory update, the workflow checks Shopify's live tracked inventory for the affected product and then:
- publishes the product when any tracked variant has inventory above zero
- unpublishes the product when all tracked variants are at zero or below
Selected Shopify publications are loaded live in the setup UI and stored by publication ID.
Products with untracked variants are skipped for auto publish and auto unpublish, because tracked inventory alone would not be a reliable visibility signal for them.
Internal pacing
This template automatically chooses internal row batch sizing and chunk staggering based on CSV size, inventory-column complexity, and whether auto publish or auto unpublish is enabled. Shopify throttling is handled internally with deferred retries so the workflow can slow down instead of surfacing throttle failures as row errors.
Important limits
Handlemode only supports single-variant productsVariant SKUmode is the recommended mode for multi-variant catalogs- This template updates inventory only. It does not change price, cost, metafields, or product content
Header mapping overrides
If your supplier or source file uses different column names, you can keep the original file and configure mappings in setup:
Identifier source header overridelets you point the template at a custom SKU or handle columnInventory header mappingslets you map supplier stock columns to Shopify locations using one line per mapping
Example:
Supplier SKU =>set in the identifier override fieldSydney Qty => Sydney WarehouseMelbourne Stock => Melbourne Warehouse
Setup fields
CSV URL, pre-signed download URL, or Google Sheets share URL.
Use SKU for most catalogs. Use Handle only for single-variant products.
Optional source header name to use instead of the default 'Variant SKU' or 'Handle' column.
Optional line-by-line mapping when supplier stock columns do not use the 'Inventory: Location Name' format. Use one line per mapping: Source Header => Shopify Location Name
Optional Shopify sales channels used by the auto publish and auto unpublish rules.
Publish affected products to the selected channels when Shopify's live tracked inventory is above zero after sync.
Unpublish affected products from the selected channels when all tracked variants are at zero or below after sync.