View as Markdown
Shopify  icon

Shopify ACTION

Create Smart Collection

Creates a smart collection whose membership is defined by conditions (rules). See the documentation
  • Action
  • Writes data
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Shopify account once, then configure and run Create Smart Collection from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "shopify-create-smart-collection",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    shopify: { authProvisionId: "apn_xxxxxxx" },
    title: "Title",
    matchType: "Match Type",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Smart Collection inputs
Property Type Description
title Title string
Title of the smart collection
Required
matchType Match Type string
Whether a product must match ALL of the conditions or ANY (at least one) to be included in the collection
Required
conditions Conditions string
A JSON array of condition objects that define which products are automatically included. Shape by type: text/tag/status types (productTag, productTitle, productType, productVendor, variantTitle, productStatus) use values (array) + relation; price types (variantPrice, variantCompareAtPrice) use value (amount) + relation; variantInventory uses value (integer) + relation; variantWeight uses value (number) + unit + relation. Relations by type — productTag: TAGGED_WITH/NOT_TAGGED_WITH; text: EQUALS/NOT_EQUALS/CONTAINS/DOES_NOT_CONTAIN/STARTS_WITH/ENDS_WITH; amounts: EQUALS/NOT_EQUALS/GREATER_THAN/LESS_THAN. Example: [{"type":"productTag","relation":"TAGGED_WITH","values":["sale"]}]
Required

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
shopify-create-smart-collection
Version
0.1.2
App
Shopify
Authentication
OAuth
Read-only
No
Destructive
No
Open world
Yes