# Bulk assign shipping profiles from CSV URL

Assigns Shopify variants to shipping profiles from a CSV URL using variant SKU and profile-name columns. Includes dry-run mode, duplicate SKU handling, and safety limits.

Canonical URL: https://templates.jsworkflows.com/templates/bulk-assign-shipping-profiles-from-csv-url/

## When to use this template

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

What it does: Assigns Shopify variants to shipping profiles from a CSV URL using variant SKU and profile-name columns. Includes dry-run mode, duplicate SKU handling, and safety limits.

It is designed for Shopify shipping 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 "One-time schedule" trigger. It includes setup fields for merchant-facing values, so you can configure the workflow before installing it.

## Metadata

- Category: Shipping
- Trigger: One-time schedule
- Workflow type: Scheduled
- Complexity: advanced
- Usage class: heavy-operation

## Connected services

- None

## Additional Shopify scopes

- write_shipping

## Setup fields

- Run label (`TASK_LABEL`)
  - Type: text
  - Storage: config
  - Required: yes
  - Description: Human-readable label stored in logs.
- CSV URL (`CSV_URL`)
  - Type: text
  - Storage: config
  - Required: yes
  - Description: Public raw CSV URL, direct download URL, or Google Sheets share URL.
- SKU column (`SKU_COLUMN`)
  - Type: text
  - Storage: config
  - Required: yes
  - Description: CSV header containing Shopify variant SKUs.
- Shipping profile column (`PROFILE_COLUMN`)
  - Type: text
  - Storage: config
  - Required: yes
  - Description: CSV header containing the target Shopify shipping profile name.
- CSV delimiter (`CSV_DELIMITER`)
  - Type: select
  - Storage: config
  - Required: yes
  - Description: Delimiter used by the source file.
- Dry run only (`DRY_RUN`)
  - Type: checkbox
  - Storage: config
  - Required: no
  - Description: Preview matching variants and planned profile changes without updating Shopify.
- Update duplicate SKUs (`UPDATE_DUPLICATE_SKUS`)
  - Type: checkbox
  - Storage: config
  - Required: no
  - Description: Update every Shopify variant that uses the same SKU. Disable to report duplicate SKU matches instead.
- Safety limit (`MAX_ROWS`)
  - Type: number
  - Storage: config
  - Required: no
  - Description: Maximum CSV rows to process. Use 0 for no limit.

## Setup guide

## Before you start

Use this template to assign Shopify variants to shipping profiles from a CSV URL. It is useful when shipping-profile assignment is managed outside Shopify, for example in a spreadsheet or supplier file.

## What this workflow does

- Downloads a CSV file from a public URL
- Reads a SKU column and a shipping-profile column
- Finds matching Shopify variants by SKU
- Assigns each matching variant to the named shipping profile
- Supports duplicate SKUs when you want every matching variant updated
- Starts in dry-run mode so you can preview the planned changes first

## CSV requirements

Default headers:

```csv
SKU,SHIPPING_PROFILE
ABC-001,Fragile items
ABC-002,Oversized
ABC-003,Default
```

- `SKU` must match Shopify variant SKUs
- `SHIPPING_PROFILE` must match an existing Shopify shipping profile name
- Change the column names in setup if your CSV uses different headers
- Use `Default` to move a variant back to Shopify's default shipping profile
- Each CSV row should describe one SKU-to-profile assignment

## Source URL requirements

- The URL must return raw CSV data
- Google Sheets share URLs are converted to CSV export URLs automatically
- Dropbox links are converted to direct downloads with `dl=1` automatically
- The CSV must be UTF-8 and include a header row

## Duplicate SKUs

If `Update duplicate SKUs` is enabled, every Shopify variant with the matching SKU is updated. If it is disabled, rows with duplicate Shopify SKU matches are reported as failures so you can review them first.

## Dry run first

Keep `Dry run only` enabled for the first run. The workflow logs how many rows were read, how many variants matched, what profile changes would be made, and examples of skipped or failed rows. After reviewing the output, disable dry run and run again.

## Important limits

- This template assigns variants to existing shipping profiles only
- It does not create shipping profiles, zones, rates, or delivery methods
- Shipping profile names are matched case-insensitively, but duplicate profile names are treated as an error
- Profile assignment is variant-level, so products with multiple variants can have variants assigned independently
