younifyd
Menu

products

Returns a paginated list of the shop's products. For full-text storefront search, use the search query instead.

Use it in a workflow

  1. Add a step and choose the Shopify Storefront connector.
  2. Pick the products action (under Products).
  3. Fill in the fields below, then reference the result from later steps as {{products.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.

graphql
query Products($first: Int, $after: String, $last: Int, $before: String, $reverse: Boolean, $sortKey: ProductSortKeys, $query: String) {
  products(
    first: $first
    after: $after
    last: $last
    before: $before
    reverse: $reverse
    sortKey: $sortKey
    query: $query
  ) {
    edges {
      cursor
      node {
        availableForSale
        category
        compareAtPriceRange
        createdAt
        descriptionHtml
        encodedVariantAvailability
        encodedVariantExistence
        featuredImage
        handle
        id
        isGiftCard
        onlineStoreUrl
        priceRange
        productType
        publishedAt
        requiresSellingPlan
        seo
        tags
        title
        totalInventory
        trackingParameters
        updatedAt
        variantsCount
        vendor
      }
    }
    filters {
      id
      label
      presentation
      type
      values {
        count
        id
        image
        input
        label
        swatch
      }
    }
    nodes {
      availableForSale
      category {
        ancestors
        id
        name
      }
      compareAtPriceRange {
        maxVariantPrice
        minVariantPrice
      }
      createdAt
      descriptionHtml
      encodedVariantAvailability
      encodedVariantExistence
      featuredImage {
        altText
        height
        id
        originalSrc
        src
        thumbhash
        width
      }
      handle
      id
      isGiftCard
      onlineStoreUrl
      priceRange {
        maxVariantPrice
        minVariantPrice
      }
      productType
      publishedAt
      requiresSellingPlan
      seo {
        description
        title
      }
      tags
      title
      totalInventory
      trackingParameters
      updatedAt
      variantsCount {
        count
        precision
      }
      vendor
    }
    pageInfo {
      endCursor
      hasNextPage
      hasPreviousPage
      startCursor
    }
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

firstnumber

Returns up to the first `n` elements from the list.

afterstring

Returns the elements that come after the specified cursor.

lastnumber

Returns up to the last `n` elements from the list.

beforestring

Returns the elements that come before the specified cursor.

reverseboolean

Reverse the order of the underlying list.

sortKeystring

Sort the underlying list by the given key.

One ofTITLEPRODUCT_TYPEVENDORUPDATED_ATCREATED_ATBEST_SELLINGPRICEIDRELEVANCE

querystring

You can apply one or multiple filters to a query. | name | description | acceptable_values | default_value | example_use | | ---- | ---- | ---- | ---- | ---- | | available_for_sale | Filter by products that have at least one product variant available for sale. | | created_at | Filter by the date and time when the product was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`<br/> - `created_at:<now`<br/> - `created_at:<=2024` | | product_type | Filter by a comma-separated list of [product types](https://help.shopify.com/en/manual/products/details/product-type). | | | `product_type:snowboard` | | tag | Filter products by the product [`tags`](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-tags) field. | | | `tag:my_tag` | | tag_not | Filter by products that don't have the specified product [tags](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-tags). | | | `tag_not:my_tag` | | title | Filter by the product [`title`](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-title) field. | | | `title:The Minimal Snowboard` | | updated_at | Filter by the date and time when the product was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`<br/> - `updated_at:<now`<br/> - `updated_at:<=2024` | | variants.price | Filter by the price of the product's variants. | | vendor | Filter by the product [`vendor`](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-vendor) field. | | | - `vendor:Snowdevil`<br/> - `vendor:Snowdevil OR vendor:Icedevil` | Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).

json
{
  "first": 0,
  "after": "string",
  "last": 0,
  "before": "string",
  "reverse": false,
  "sortKey": "TITLE",
  "query": "string"
}

Response

Read the result with {{products.response.data.data.products}}. If the API returns errors, the step fails and they are at {{products.response.data.errors}}.

edgesarray<object>
cursorobject
nodeobject
filtersarray<object>
idobject
labelobject
presentationobject
typeobject
valuesobject
nodesarray<object>
availableForSaleobject
categoryobject
compareAtPriceRangeobject
createdAtobject
descriptionHtmlobject
encodedVariantAvailabilityobject
encodedVariantExistenceobject
featuredImageobject
handleobject
idobject
isGiftCardobject
onlineStoreUrlobject
priceRangeobject
productTypeobject
publishedAtobject
requiresSellingPlanobject
seoobject
tagsobject
titleobject
totalInventoryobject
trackingParametersobject
updatedAtobject
variantsCountobject
vendorobject
pageInfoobject
endCursorstring
hasNextPageboolean
hasPreviousPageboolean
startCursorstring

Need more? See the Shopify Storefront guide for connection setup and behaviour shared by every action.

Was this page helpful?