shopify-automation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Shopify Automation via Rube MCP

通过Rube MCP实现Shopify自动化

Automate Shopify operations through Composio's Shopify toolkit via Rube MCP.
通过Composio的Shopify工具包,借助Rube MCP实现Shopify运营自动化。

Prerequisites

前置条件

  • Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
  • Active Shopify connection via
    RUBE_MANAGE_CONNECTIONS
    with toolkit
    shopify
  • Always call
    RUBE_SEARCH_TOOLS
    first to get current tool schemas
  • 必须已连接Rube MCP(需确保RUBE_SEARCH_TOOLS可用)
  • 通过
    RUBE_MANAGE_CONNECTIONS
    完成Shopify的激活连接,工具包为
    shopify
  • 请始终先调用
    RUBE_SEARCH_TOOLS
    以获取最新的工具schema

Setup

设置步骤

Get Rube MCP: Add
https://rube.app/mcp
as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
  1. Verify Rube MCP is available by confirming
    RUBE_SEARCH_TOOLS
    responds
  2. Call
    RUBE_MANAGE_CONNECTIONS
    with toolkit
    shopify
  3. If connection is not ACTIVE, follow the returned auth link to complete Shopify OAuth
  4. Confirm connection status shows ACTIVE before running any workflows
获取Rube MCP:在客户端配置中添加
https://rube.app/mcp
作为MCP服务器。无需API密钥——只需添加端点即可使用。
  1. 确认
    RUBE_SEARCH_TOOLS
    能正常响应,以此验证Rube MCP是否可用
  2. 调用
    RUBE_MANAGE_CONNECTIONS
    ,指定工具包为
    shopify
  3. 如果连接状态未显示为ACTIVE,请按照返回的授权链接完成Shopify OAuth认证
  4. 在运行任何工作流之前,确认连接状态为ACTIVE

Core Workflows

核心工作流

1. Manage Products

1. 产品管理

When to use: User wants to list, search, create, or manage products
Tool sequence:
  1. SHOPIFY_GET_PRODUCTS
    /
    SHOPIFY_GET_PRODUCTS_PAGINATED
    - List products [Optional]
  2. SHOPIFY_GET_PRODUCT
    - Get single product details [Optional]
  3. SHOPIFY_BULK_CREATE_PRODUCTS
    - Create products in bulk [Optional]
  4. SHOPIFY_GET_PRODUCTS_COUNT
    - Get product count [Optional]
Key parameters:
  • product_id
    : Product ID for single retrieval
  • title
    : Product title
  • vendor
    : Product vendor
  • status
    : 'active', 'draft', or 'archived'
Pitfalls:
  • Paginated results require cursor-based pagination for large catalogs
  • Product variants are nested within the product object
适用场景:用户需要列出、搜索、创建或管理产品
工具执行顺序
  1. SHOPIFY_GET_PRODUCTS
    /
    SHOPIFY_GET_PRODUCTS_PAGINATED
    - 列出产品(可选)
  2. SHOPIFY_GET_PRODUCT
    - 获取单个产品详情(可选)
  3. SHOPIFY_BULK_CREATE_PRODUCTS
    - 批量创建产品(可选)
  4. SHOPIFY_GET_PRODUCTS_COUNT
    - 获取产品数量(可选)
关键参数
  • product_id
    :单个产品检索的产品ID
  • title
    :产品标题
  • vendor
    :产品供应商
  • status
    :'active'、'draft'或'archived'
注意事项
  • 对于大型商品目录,分页结果需要使用基于游标(cursor)的分页方式
  • 产品变体嵌套在产品对象中

2. Manage Orders

2. 订单管理

When to use: User wants to list, search, or inspect orders
Tool sequence:
  1. SHOPIFY_GET_ORDERS_WITH_FILTERS
    - List orders with filters [Required]
  2. SHOPIFY_GET_ORDER
    - Get single order details [Optional]
  3. SHOPIFY_GET_FULFILLMENT
    - Get fulfillment details [Optional]
  4. SHOPIFY_GET_FULFILLMENT_EVENTS
    - Track fulfillment events [Optional]
Key parameters:
  • status
    : Order status filter ('any', 'open', 'closed', 'cancelled')
  • financial_status
    : Payment status filter
  • fulfillment_status
    : Fulfillment status filter
  • order_id
    : Order ID for single retrieval
  • created_at_min
    /
    created_at_max
    : Date range filters
Pitfalls:
  • Order IDs are numeric; use string format for API calls
  • Default order listing may not include all statuses; specify 'any' for all
适用场景:用户需要列出、搜索或查看订单详情
工具执行顺序
  1. SHOPIFY_GET_ORDERS_WITH_FILTERS
    - 按条件列出订单(必填)
  2. SHOPIFY_GET_ORDER
    - 获取单个订单详情(可选)
  3. SHOPIFY_GET_FULFILLMENT
    - 获取履约详情(可选)
  4. SHOPIFY_GET_FULFILLMENT_EVENTS
    - 跟踪履约事件(可选)
关键参数
  • status
    :订单状态筛选('any'、'open'、'closed'、'cancelled')
  • financial_status
    :支付状态筛选
  • fulfillment_status
    :履约状态筛选
  • order_id
    :单个订单检索的订单ID
  • created_at_min
    /
    created_at_max
    :日期范围筛选
注意事项
  • 订单ID为数字类型;在API调用中请使用字符串格式
  • 默认的订单列表可能不包含所有状态;如需全部状态请指定'any'

3. Manage Customers

3. 客户管理

When to use: User wants to list or search customers
Tool sequence:
  1. SHOPIFY_GET_ALL_CUSTOMERS
    - List all customers [Required]
Key parameters:
  • limit
    : Number of customers per page
  • since_id
    : Pagination cursor
Pitfalls:
  • Customer data includes order count and total spent
  • Large customer lists require pagination
适用场景:用户需要列出或搜索客户
工具执行顺序
  1. SHOPIFY_GET_ALL_CUSTOMERS
    - 列出所有客户(必填)
关键参数
  • limit
    :每页显示的客户数量
  • since_id
    :分页游标
注意事项
  • 客户数据包含订单数量和总消费金额
  • 大型客户列表需要使用分页

4. Manage Collections

4. 商品合集管理

When to use: User wants to manage product collections
Tool sequence:
  1. SHOPIFY_GET_SMART_COLLECTIONS
    - List smart collections [Optional]
  2. SHOPIFY_GET_SMART_COLLECTION_BY_ID
    - Get collection details [Optional]
  3. SHOPIFY_CREATE_SMART_COLLECTIONS
    - Create a smart collection [Optional]
  4. SHOPIFY_ADD_PRODUCT_TO_COLLECTION
    - Add product to collection [Optional]
  5. SHOPIFY_GET_PRODUCTS_IN_COLLECTION
    - List products in collection [Optional]
Key parameters:
  • collection_id
    : Collection ID
  • product_id
    : Product ID for adding to collection
  • rules
    : Smart collection rules for automatic inclusion
Pitfalls:
  • Smart collections auto-populate based on rules; manual collections use custom collections API
  • Collection count endpoints provide approximate counts
适用场景:用户需要管理产品合集
工具执行顺序
  1. SHOPIFY_GET_SMART_COLLECTIONS
    - 列出智能合集(可选)
  2. SHOPIFY_GET_SMART_COLLECTION_BY_ID
    - 获取合集详情(可选)
  3. SHOPIFY_CREATE_SMART_COLLECTIONS
    - 创建智能合集(可选)
  4. SHOPIFY_ADD_PRODUCT_TO_COLLECTION
    - 将产品添加到合集中(可选)
  5. SHOPIFY_GET_PRODUCTS_IN_COLLECTION
    - 列出合集中的产品(可选)
关键参数
  • collection_id
    :合集ID
  • product_id
    :要添加到合集的产品ID
  • rules
    :用于自动纳入产品的智能合集规则
注意事项
  • 智能合集会根据规则自动填充产品;手动合集需使用自定义合集API
  • 合集数量端点提供的是近似数量

5. Manage Inventory

5. 库存管理

When to use: User wants to check or manage inventory levels
Tool sequence:
  1. SHOPIFY_GET_INVENTORY_LEVELS
    /
    SHOPIFY_RETRIEVES_A_LIST_OF_INVENTORY_LEVELS
    - Check stock [Required]
  2. SHOPIFY_LIST_LOCATION
    - List store locations [Optional]
Key parameters:
  • inventory_item_ids
    : Inventory item IDs to check
  • location_ids
    : Location IDs to filter by
Pitfalls:
  • Inventory is tracked per variant per location
  • Location IDs are required for multi-location stores
适用场景:用户需要查看或管理库存水平
工具执行顺序
  1. SHOPIFY_GET_INVENTORY_LEVELS
    /
    SHOPIFY_RETRIEVES_A_LIST_OF_INVENTORY_LEVELS
    - 检查库存(必填)
  2. SHOPIFY_LIST_LOCATION
    - 列出店铺位置(可选)
关键参数
  • inventory_item_ids
    :要检查的库存项目ID
  • location_ids
    :用于筛选的位置ID
注意事项
  • 库存按每个变体、每个位置进行跟踪
  • 多位置店铺需要指定位置ID

Common Patterns

通用模式

Pagination

分页

  • Use
    limit
    and
    page_info
    cursor for paginated results
  • Check response for
    next
    link header
  • Continue until no more pages available
  • 使用
    limit
    page_info
    游标实现分页结果
  • 检查响应中的
    next
    链接头
  • 持续调用直到没有更多页面

GraphQL Queries

GraphQL查询

For advanced operations:
1. Call SHOPIFY_GRAPH_QL_QUERY with custom query
2. Parse response from data object
对于高级操作:
1. 调用SHOPIFY_GRAPH_QL_QUERY并传入自定义查询语句
2. 从data对象中解析响应结果

Known Pitfalls

已知注意事项

API Versioning:
  • Shopify REST API has versioned endpoints
  • Some features require specific API versions
Rate Limits:
  • REST API: 2 requests/second for standard plans
  • GraphQL: 1000 cost points per second
API版本控制
  • Shopify REST API的端点带有版本号
  • 部分功能需要特定的API版本
速率限制
  • REST API:标准计划为每秒2次请求
  • GraphQL:每秒1000个成本点

Quick Reference

快速参考

TaskTool SlugKey Params
List productsSHOPIFY_GET_PRODUCTS(filters)
Get productSHOPIFY_GET_PRODUCTproduct_id
Products paginatedSHOPIFY_GET_PRODUCTS_PAGINATEDlimit, page_info
Bulk createSHOPIFY_BULK_CREATE_PRODUCTSproducts
Product countSHOPIFY_GET_PRODUCTS_COUNT(none)
List ordersSHOPIFY_GET_ORDERS_WITH_FILTERSstatus, financial_status
Get orderSHOPIFY_GET_ORDERorder_id
List customersSHOPIFY_GET_ALL_CUSTOMERSlimit
Shop detailsSHOPIFY_GET_SHOP_DETAILS(none)
Validate accessSHOPIFY_VALIDATE_ACCESS(none)
Smart collectionsSHOPIFY_GET_SMART_COLLECTIONS(none)
Products in collectionSHOPIFY_GET_PRODUCTS_IN_COLLECTIONcollection_id
Inventory levelsSHOPIFY_GET_INVENTORY_LEVELSinventory_item_ids
LocationsSHOPIFY_LIST_LOCATION(none)
FulfillmentSHOPIFY_GET_FULFILLMENTorder_id, fulfillment_id
GraphQLSHOPIFY_GRAPH_QL_QUERYquery
Bulk querySHOPIFY_BULK_QUERY_OPERATIONquery
任务工具标识关键参数
列出产品SHOPIFY_GET_PRODUCTS(筛选条件)
获取单个产品SHOPIFY_GET_PRODUCTproduct_id
分页列出产品SHOPIFY_GET_PRODUCTS_PAGINATEDlimit, page_info
批量创建产品SHOPIFY_BULK_CREATE_PRODUCTSproducts
获取产品数量SHOPIFY_GET_PRODUCTS_COUNT(无)
列出订单SHOPIFY_GET_ORDERS_WITH_FILTERSstatus, financial_status
获取单个订单SHOPIFY_GET_ORDERorder_id
列出客户SHOPIFY_GET_ALL_CUSTOMERSlimit
获取店铺详情SHOPIFY_GET_SHOP_DETAILS(无)
验证访问权限SHOPIFY_VALIDATE_ACCESS(无)
获取智能合集SHOPIFY_GET_SMART_COLLECTIONS(无)
获取合集中的产品SHOPIFY_GET_PRODUCTS_IN_COLLECTIONcollection_id
获取库存水平SHOPIFY_GET_INVENTORY_LEVELSinventory_item_ids
列出店铺位置SHOPIFY_LIST_LOCATION(无)
获取履约详情SHOPIFY_GET_FULFILLMENTorder_id, fulfillment_id
GraphQL查询SHOPIFY_GRAPH_QL_QUERYquery
批量查询操作SHOPIFY_BULK_QUERY_OPERATIONquery