Menu
collection
Retrieves a single Collection by its ID or handle. Use the products field to access items in the collection.
Use it in a workflow
- Add a step and choose the Shopify Storefront connector.
- Pick the collection action (under Collection).
- Fill in the fields below, then reference the result from later steps as
{{collection.response.data}}.
Query
This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.
query Collection($id: ID, $handle: String) {
collection(id: $id, handle: $handle) {
descriptionHtml
handle
id
image {
altText
height
id
originalSrc
src
thumbhash
width
}
onlineStoreUrl
seo {
description
title
}
title
trackingParameters
updatedAt
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"id": "string",
"handle": "string"
}
Response
Read the result with {{collection.response.data.data.collection}}. If the API returns errors, the step fails and they are at {{collection.response.data.errors}}.
Need more? See the Shopify Storefront guide for connection setup and behaviour shared by every action.
Was this page helpful?