# Import products from CSV URL

Imports or updates products, variants, images, and multi-location inventory from a public CSV URL with optional publication targeting.

Canonical URL: https://templates.jsworkflows.com/templates/import-products-from-csv-url/

## When to use this template

This template is built for Shopify stores using the JsWorkflows app.

Use this template when you want a ready-made workflow for this use case: Imports or updates products, variants, images, and multi-location inventory from a public CSV URL with optional publication targeting.

It is designed for Shopify inventory and merchandising operations and gives you a production-ready starting point instead of building the automation from scratch.

This workflow uses the scheduled trigger model and starts from the "Daily schedule" trigger. It includes setup fields for merchant-facing values, so you can configure the workflow before installing it.

## Metadata

- Category: Inventory and merch
- Trigger: Daily schedule
- Workflow type: Scheduled
- Complexity: advanced
- Usage class: heavy-operation

## Connected services

- None

## Additional Shopify scopes

- read_products
- write_products
- read_locations
- read_inventory
- read_publications
- write_publications
- write_inventory

## Setup fields

- CSV URL (`CSV_URL`)
  - Type: text
  - Storage: config
  - Required: yes
  - Description: CSV URL, pre-signed download URL, or Google Sheets share URL. Google Sheets links are converted to the CSV export URL automatically.
- Publish to channels (`PUBLICATION_IDS`)
  - Type: shopify_publication_multiselect
  - Storage: config
  - Required: no
  - Description: Optional Shopify sales channels to publish ACTIVE products to after a successful sync.

## Setup guide

## Before you start

This template reads a CSV URL and uses Shopify `productSet` to create or update products by **Handle**.

## Source requirements

- The URL must ultimately return raw CSV data
- Google Sheets share/edit URLs are accepted and automatically converted to the CSV export URL
- The CSV may be public or use a pre-signed URL
- Authenticated pages, login redirects, or HTML landing pages will not work
- Rows for the same `Handle` must stay **contiguous** in the CSV

## Supported data

- product title, description, vendor, product type, tags, status, gift card flag
- category IDs and variant-level tax/origin fields
- variants and option values
- product and variant metafields
- product images from `Image Src`
- variant-specific images from `Variant Image`
- multi-location inventory through `Inventory: Location Name` columns
- optional publishing to selected Shopify sales channels

## Required headers

- `Handle`
- `Title`
- `Variant SKU`

## Common optional headers

- `Body HTML`
- `Vendor`
- `Product Type`
- `Tags`
- `Status`
- `Gift Card`
- `Category: ID`
- `Image Src`
- `Image Alt Text`
- `Variant Price`
- `Variant Compare At Price`
- `Variant Barcode`
- `Variant Image`
- `Variant Position`
- `Variant Taxable`
- `Variant Tax Code`
- `Variant Inventory Policy`
- `Variant Cost`
- `Variant Weight`
- `Variant Weight Unit`
- `Variant Grams`
- `Variant Requires Shipping`
- `Variant Tracked`
- `Variant HS Code`
- `Variant Country of Origin`
- `Variant Province of Origin`

## Variant options

Use option columns when a product has multiple variants:
- `Option1 Name` / `Option1 Value`
- `Option2 Name` / `Option2 Value`
- `Option3 Name` / `Option3 Value`

For the same `Handle`, option names and product-level fields must stay internally consistent across all rows.

## Dynamic headers

You can add these dynamic columns:
- `Product Metafield: namespace.key|type`
- `Variant Metafield: namespace.key|type`
- `Inventory: Shopify Location Name`

Examples:
- `Product Metafield: custom.material|single_line_text_field`
- `Variant Metafield: specs.origin_country|single_line_text_field`
- `Inventory: Sydney Warehouse`

## Additional supported fields

- `Category: ID` must be a valid Shopify taxonomy category ID
- `Image Alt Text` is applied to each image URL listed on that row
- `Variant Image` attaches an image URL to a specific variant and also includes it in the product file list
- `Variant Weight` should be paired with `Variant Weight Unit` (`g`, `kg`, `oz`, or `lb`)
- `Variant Grams` still works and is used as a fallback when `Variant Weight` is not provided

## Publishing behavior

If you select one or more Shopify sales channels during setup, ACTIVE products are published to those destinations after a successful sync.

The setup UI loads the shop's live publications and stores their publication IDs, so the workflow publishes by Shopify publication ID instead of typed names.

## Error handling

Validation failures, publish errors, inventory lookup errors, and metafield write errors are written to the workflow logs with row numbers and handles.

## Sample file

- [Download sample CSV](https://sample.jsworkflows.com/sample-import-products.csv)


Execution pacing is determined automatically based on CSV size, inventory columns, and publishing settings.
