Quick Overview
This workflow runs manually to migrate visible category data from Lightspeed to Shopify by creating Shopify collections via the Admin GraphQL API, adding URL redirects from old category paths, and publishing the new collections to all Shopify publication channels.
How it works
- Starts when you manually execute the workflow in n8n.
- Fetches all publication channels from your Shopify store using the Shopify Admin GraphQL API.
- Retrieves up to 250 categories from the Lightspeed API and splits the response into one item per category.
- Filters the list to only categories marked as visible in Lightspeed.
- For each visible category, creates a Shopify collection with title, handle, description, SEO fields, and an optional image.
- Creates a Shopify URL redirect from the original Lightspeed category URL path to the new Shopify /collections/{handle} URL.
- Publishes the created collection to all fetched Shopify publication channels and stops with an error if any Shopify mutation returns userErrors.
Setup
- Add a Shopify Admin API access token as an HTTP Header Auth credential (header name
X-Shopify-Access-Token) and assign it to the Shopify GraphQL requests.
- Add your Lightspeed API key and secret as an HTTP Basic Auth credential and assign it to the Lightspeed categories request.
- Update the Shopify store URL, API version, and Lightspeed API base URL in the workflow’s configuration values before running.
- Ensure your Lightspeed categories include the fields used for mapping (title, content/description, url/handle, SEO metadata, and optional image URL) and adjust the mappings if your API responses differ.