CONNECT APP
Build with Shopify
Commerce
- OAuth
MCP
Give your agent Shopify tools
Every Shopify action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's Shopify account for each tool call — you store no tokens.
// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "shopify",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Add Products to Custom Collection:
const result = await mcp.callTool({
name: "shopify-add-product-to-custom-collection",
arguments: {
productIds: ["Product IDs"],
collectionId: "Collection ID",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", # any stable ID for this user in your system
"x-pd-app-slug": "shopify",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Add Products to Custom Collection:
result = await session.call_tool("shopify-add-product-to-custom-collection", {
"productIds": ["Product IDs"],
"collectionId": "Collection ID",
})API PROXY
Call the Shopify API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the Shopify API with the connected user's credentials attached. You store no tokens and write no refresh logic.
const resp = await pd.proxy.get({
externalUserId: "{external_user_id}", // any stable ID for this user in your system
accountId: "apn_xxxxxxx",
url: "https://api.example.com/v1/me",
})
// Any allowed Shopify endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.# The path segment is the target URL, URL-safe base64 encoded:
# https://api.example.com/v1/me
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEvbWU?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run Shopify actions from your backend
Connect a user's Shopify account once, then run Add Products to Custom Collection on their behalf from your own code — TypeScript, Python, or plain HTTP.
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-add-product-to-custom-collection",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
shopify: { authProvisionId: "apn_xxxxxxx" },
productIds: ["Product IDs"],
collectionId: "Collection ID",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="shopify-add-product-to-custom-collection",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"shopify": {"authProvisionId": "apn_xxxxxxx"},
"productIds": ["Product IDs"],
"collectionId": "Collection ID",
},
)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "shopify-add-product-to-custom-collection",
"configured_props": {
"shopify": { "authProvisionId": "apn_xxxxxxx" },
"productIds": ["Product IDs"],
"collectionId": "Collection ID"
}
}'TOOLS
Shopify actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Add Products to Custom Collection
actionAdds a product or products to a custom collection. See the documentationWritev0.0.17 -
Add Tags
actionAdd tags. See the documentationWritev0.0.23 -
Cancel Fulfillment
actionCancels a fulfillment. Run the Search for Orders action and inspect the order's fulfillments to obtain the fulfillment GID. See the documentation.Writev0.0.5 -
Cancel Fulfillment Order
actionCancels a fulfillment order. Run Search for Orders and inspect the order's fulfillment orders to obtain the fulfillment order GID. See the documentation.Writev0.0.5 -
Cancel Order
actionCancel an existing order. Run Search for Orders first to obtain the order GID. See the documentationWritev0.0.6 -
Create Article
actionCreate a new blog article. See the documentationWritev0.0.17 -
Create Blog
actionCreate a new blog. See the documentationWritev0.0.17 -
Create Custom Collection
actionCreate a new custom collection. See the documentationWritev0.0.17 -
Create Discount Codes in Bulk
actionAdds multiple discount codes to a price rule in Shopify (up to 100 codes per request). See the documentation.Writev0.0.4 -
Create Gift Card
actionCreates a new gift card. To supply an optional customer, run Get Customers first to retrieve the customer GID. See the documentation.Writev0.0.5 -
Create Metafield
actionCreates a metafield belonging to a resource. See the documentationWritev0.0.21 -
Create Metaobject
actionCreates a metaobject. See the documentationWritev0.0.16 -
Create Order
actionCreates a new order. See the documentation.Writev1.0.0 -
Create Page
actionCreate a new page. See the documentationWritev0.0.17 -
Create Product
actionCreate a new product. See the documentationWritev0.0.24 -
Create Product Variant
actionCreate a new product variant. See the documentationWritev0.0.24 -
Create Refund
actionCreate a refund on an existing order. Run Search for Orders first to obtain the order GID and the line item GIDs to refund. See the documentationWritev0.0.6 -
Create Return
actionCreates a return for an order. See the documentation.Writev0.0.5 -
Create Smart Collection
actionCreates a smart collection whose membership is defined by conditions (rules). See the documentationWritev0.1.2 -
Delete Article
actionDelete an existing blog article. See the documentationWritev0.0.17 -
Delete Blog
actionDelete an existing blog. See the documentationWritev0.0.17 -
Delete Discount Code
actionPermanently deletes a discount code from a price rule in Shopify. See the documentation.Writev0.0.3 -
Delete Metafield
actionDeletes a metafield belonging to a resource. See the documentationWritev0.0.19 -
Delete Page
actionDelete an existing page. See the documentationWritev0.0.17 -
Get Articles
actionRetrieve a list of all articles from a blog. See the documentationRead-onlyv0.0.17 -
Get Assigned Fulfillment Orders
actionRetrieve a list of fulfillment orders assigned to a merchant location. See the documentationRead-onlyv0.0.11 -
Get Customer
actionRetrieve a single customer by ID. See the documentationRead-onlyv0.0.9 -
Get Customers
actionRetrieve a list of customers. See the documentationRead-onlyv0.0.11 -
Get Discount Code
actionRetrieves a single discount code that belongs to a price rule in Shopify. Run List Price Rules to find a valid price rule ID and List Discount Codes to find a valid discount code ID. See the documentation.Read-onlyv0.0.4 -
Get Draft Order
actionRetrieve a single draft order by ID. See the documentationRead-onlyv0.0.9 -
Get Draft Orders
actionRetrieve a list of draft orders. See the documentationRead-onlyv0.0.10 -
Get Fulfillment
actionRetrieve a fulfillment, including tracking info, status, and delivery timestamps. See the documentationRead-onlyv0.0.6 -
Get Fulfillment Order
actionRetrieve a single fulfillment order by ID. See the documentationRead-onlyv0.0.9 -
Get Fulfillment Orders
actionRetrieve a list of fulfillment orders. See the documentationRead-onlyv0.0.14 -
Get Metafields
actionRetrieves a list of metafields that belong to a resource. See the documentationRead-onlyv0.0.22 -
Get Metaobjects
actionRetrieves a list of metaobjects. See the documentationRead-onlyv0.0.15 -
Get Pages
actionRetrieve a list of all pages. See the documentationRead-onlyv0.0.17 -
Hold Fulfillment Order
actionPlaces a fulfillment order on hold. Run Search for Orders and inspect the order's fulfillment orders to obtain the fulfillment order GID. See the documentation.Writev0.0.5 -
List Discount Codes
actionLists all discount codes for a given price rule in Shopify so you can obtain a valid discount code ID. See the documentation.Read-onlyv0.0.4 -
List Price Rules
actionLists price rules in the Shopify store. See the documentation.Read-onlyv0.0.3 -
Refund Return
actionProcesses an existing return in Shopify via thereturnProcessmutation, marking the specified return line items as processed. By default no refund is issued — to also issue a refund, include afinancialTransferobject with anissueRefundoperation (and its requiredorderTransactions) in Additional Fields. See the documentation.Writev0.1.2 -
Run Bulk Mutation
actionRuns a bulk mutation (Shopify'sbulkOperationRunMutation) by uploading a JSONL file of per-line mutation variables, so a mutation (e.g. product/variant/metafield create or update) runs once per line across thousands of records in a single Admin GraphQL bulk operation instead of one API call per record. See the documentationWritev0.1.1 -
Search Custom Collection by Name
actionSearch for a custom collection by name/title. See the documentationRead-onlyv0.0.16 -
Search for Orders
actionSearch for an order or a list of orders. See the documentationRead-onlyv0.0.10 -
Search for Product Variant
actionSearch for product variants or create one if not found. See the documentationWritev0.0.23 -
Search for Products
actionSearch for products. See the documentationRead-onlyv0.0.24 -
Send Order Invoice
actionSends an invoice email for an existing order. See the documentation.Writev0.0.5 -
Submit Cancellation Request
actionRequest cancellation of a fulfillment order. This is a fulfillment-service workflow distinct from cancelling the order itself. Run Get Fulfillment Orders first to obtain the fulfillment order GID. See the documentationWritev0.0.6 -
Update Article
actionUpdate a blog article. See the documentationWritev0.0.17 -
Update Discount Code
actionUpdates the value of an existing discount code belonging to a price rule in Shopify. Run List Price Rules and List Discount Codes to find valid IDs. See the documentation.Writev0.0.4 -
Update Inventory Level
actionSets the on-hand inventory level for an inventory item at a location. See the documentationWritev0.0.24 -
Update Metafield
actionUpdates the value of an existing metafield on a Shopify resource (product, customer, order, etc.) via themetafieldsSetmutation. Use this to change custom data stored on a record you've already identified. Select the owner resource and record, then the specific metafield to update, and provide the new value. This action resolves the selected metafield and reuses its existingnamespace,key, andtype— only the value is changed, and the metafield must already exist. The value must be a string serialized to the metafield'stype— for example10fornumber_integer,{"color":"red"}forjson, or2026-08-12fordate. To discover a resource's metafields first, use a list/get metafields action. See the documentationWritev0.0.21 -
Update Metaobject
actionUpdates a metaobject. See the documentationWritev0.0.17 -
Update Order
actionUpdate an existing order. See the documentationWritev0.0.9 -
Update Page
actionUpdate an existing page. See the documentationWritev0.0.17 -
Update Product
actionUpdate an existing product. See the documentationWritev0.1.15 -
Update Product Variant
actionUpdate an existing product variant. See the documentationWritev0.0.26
EVENTS
Shopify triggers
Event sources your backend can deploy for users and receive through a webhook.
-
Collection Updated (Instant)
triggerEmit new event whenever a collection is updated, including whenever products are added or removed from a collection.Instantv0.0.16 -
New Abandoned Cart
triggerEmit new event each time a user abandons their cart.v0.0.29 -
New Article
triggerEmit new event for each new article in a blog.v0.0.28 -
New Customer Data Request
triggerEmit new customer data requests for data via a GDPR request.Instantv0.0.23 -
New Event Emitted (Instant)
triggerEmit new event for each new Shopify event.Instantv0.0.24 -
New Page
triggerEmit new event for each new page published.v0.0.28 -
New product added to custom collection
triggerEmit new event each time a product is added to a custom collection.v0.0.6 -
New Product Created (Instant)
triggerEmit new event for each product added to a store.Instantv0.0.24
MULTI-APP
Use Shopify with other popular apps
Most products don't stop at one integration. Pair Shopify with the other apps your users rely on, and ship use cases that span both.
- App slug
- shopify
- Authentication
- OAuth
- Categories
- Commerce
- Actions
- 57
- Triggers
- 8
- API proxy
- Available
OAuth scopes
These are the scopes Pipedream's managed Shopify OAuth client requests when one of your users connects an account. Supply your own OAuth client to request a different set.
- read_content
- write_content
- read_customers
- write_customers
- read_draft_orders
- read_inventory
- write_inventory
- read_metaobjects
- write_metaobjects
- read_orders
- write_orders
- read_products
- write_products
- read_assigned_fulfillment_orders
- read_merchant_managed_fulfillment_orders
- write_merchant_managed_fulfillment_orders
- read_third_party_fulfillment_orders