shopify-automation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseShopify 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 with toolkit
RUBE_MANAGE_CONNECTIONSshopify - Always call first to get current tool schemas
RUBE_SEARCH_TOOLS
- 必须已连接Rube MCP(需确保RUBE_SEARCH_TOOLS可用)
- 通过完成Shopify的激活连接,工具包为
RUBE_MANAGE_CONNECTIONSshopify - 请始终先调用以获取最新的工具schema
RUBE_SEARCH_TOOLS
Setup
设置步骤
Get Rube MCP: Add as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
https://rube.app/mcp- Verify Rube MCP is available by confirming responds
RUBE_SEARCH_TOOLS - Call with toolkit
RUBE_MANAGE_CONNECTIONSshopify - If connection is not ACTIVE, follow the returned auth link to complete Shopify OAuth
- Confirm connection status shows ACTIVE before running any workflows
获取Rube MCP:在客户端配置中添加作为MCP服务器。无需API密钥——只需添加端点即可使用。
https://rube.app/mcp- 确认能正常响应,以此验证Rube MCP是否可用
RUBE_SEARCH_TOOLS - 调用,指定工具包为
RUBE_MANAGE_CONNECTIONSshopify - 如果连接状态未显示为ACTIVE,请按照返回的授权链接完成Shopify OAuth认证
- 在运行任何工作流之前,确认连接状态为ACTIVE
Core Workflows
核心工作流
1. Manage Products
1. 产品管理
When to use: User wants to list, search, create, or manage products
Tool sequence:
- /
SHOPIFY_GET_PRODUCTS- List products [Optional]SHOPIFY_GET_PRODUCTS_PAGINATED - - Get single product details [Optional]
SHOPIFY_GET_PRODUCT - - Create products in bulk [Optional]
SHOPIFY_BULK_CREATE_PRODUCTS - - Get product count [Optional]
SHOPIFY_GET_PRODUCTS_COUNT
Key parameters:
- : Product ID for single retrieval
product_id - : Product title
title - : Product vendor
vendor - : 'active', 'draft', or 'archived'
status
Pitfalls:
- Paginated results require cursor-based pagination for large catalogs
- Product variants are nested within the product object
适用场景:用户需要列出、搜索、创建或管理产品
工具执行顺序:
- /
SHOPIFY_GET_PRODUCTS- 列出产品(可选)SHOPIFY_GET_PRODUCTS_PAGINATED - - 获取单个产品详情(可选)
SHOPIFY_GET_PRODUCT - - 批量创建产品(可选)
SHOPIFY_BULK_CREATE_PRODUCTS - - 获取产品数量(可选)
SHOPIFY_GET_PRODUCTS_COUNT
关键参数:
- :单个产品检索的产品ID
product_id - :产品标题
title - :产品供应商
vendor - :'active'、'draft'或'archived'
status
注意事项:
- 对于大型商品目录,分页结果需要使用基于游标(cursor)的分页方式
- 产品变体嵌套在产品对象中
2. Manage Orders
2. 订单管理
When to use: User wants to list, search, or inspect orders
Tool sequence:
- - List orders with filters [Required]
SHOPIFY_GET_ORDERS_WITH_FILTERS - - Get single order details [Optional]
SHOPIFY_GET_ORDER - - Get fulfillment details [Optional]
SHOPIFY_GET_FULFILLMENT - - Track fulfillment events [Optional]
SHOPIFY_GET_FULFILLMENT_EVENTS
Key parameters:
- : Order status filter ('any', 'open', 'closed', 'cancelled')
status - : Payment status filter
financial_status - : Fulfillment status filter
fulfillment_status - : Order ID for single retrieval
order_id - /
created_at_min: Date range filterscreated_at_max
Pitfalls:
- Order IDs are numeric; use string format for API calls
- Default order listing may not include all statuses; specify 'any' for all
适用场景:用户需要列出、搜索或查看订单详情
工具执行顺序:
- - 按条件列出订单(必填)
SHOPIFY_GET_ORDERS_WITH_FILTERS - - 获取单个订单详情(可选)
SHOPIFY_GET_ORDER - - 获取履约详情(可选)
SHOPIFY_GET_FULFILLMENT - - 跟踪履约事件(可选)
SHOPIFY_GET_FULFILLMENT_EVENTS
关键参数:
- :订单状态筛选('any'、'open'、'closed'、'cancelled')
status - :支付状态筛选
financial_status - :履约状态筛选
fulfillment_status - :单个订单检索的订单ID
order_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:
- - List all customers [Required]
SHOPIFY_GET_ALL_CUSTOMERS
Key parameters:
- : Number of customers per page
limit - : Pagination cursor
since_id
Pitfalls:
- Customer data includes order count and total spent
- Large customer lists require pagination
适用场景:用户需要列出或搜索客户
工具执行顺序:
- - 列出所有客户(必填)
SHOPIFY_GET_ALL_CUSTOMERS
关键参数:
- :每页显示的客户数量
limit - :分页游标
since_id
注意事项:
- 客户数据包含订单数量和总消费金额
- 大型客户列表需要使用分页
4. Manage Collections
4. 商品合集管理
When to use: User wants to manage product collections
Tool sequence:
- - List smart collections [Optional]
SHOPIFY_GET_SMART_COLLECTIONS - - Get collection details [Optional]
SHOPIFY_GET_SMART_COLLECTION_BY_ID - - Create a smart collection [Optional]
SHOPIFY_CREATE_SMART_COLLECTIONS - - Add product to collection [Optional]
SHOPIFY_ADD_PRODUCT_TO_COLLECTION - - List products in collection [Optional]
SHOPIFY_GET_PRODUCTS_IN_COLLECTION
Key parameters:
- : Collection ID
collection_id - : Product ID for adding to collection
product_id - : Smart collection rules for automatic inclusion
rules
Pitfalls:
- Smart collections auto-populate based on rules; manual collections use custom collections API
- Collection count endpoints provide approximate counts
适用场景:用户需要管理产品合集
工具执行顺序:
- - 列出智能合集(可选)
SHOPIFY_GET_SMART_COLLECTIONS - - 获取合集详情(可选)
SHOPIFY_GET_SMART_COLLECTION_BY_ID - - 创建智能合集(可选)
SHOPIFY_CREATE_SMART_COLLECTIONS - - 将产品添加到合集中(可选)
SHOPIFY_ADD_PRODUCT_TO_COLLECTION - - 列出合集中的产品(可选)
SHOPIFY_GET_PRODUCTS_IN_COLLECTION
关键参数:
- :合集ID
collection_id - :要添加到合集的产品ID
product_id - :用于自动纳入产品的智能合集规则
rules
注意事项:
- 智能合集会根据规则自动填充产品;手动合集需使用自定义合集API
- 合集数量端点提供的是近似数量
5. Manage Inventory
5. 库存管理
When to use: User wants to check or manage inventory levels
Tool sequence:
- /
SHOPIFY_GET_INVENTORY_LEVELS- Check stock [Required]SHOPIFY_RETRIEVES_A_LIST_OF_INVENTORY_LEVELS - - List store locations [Optional]
SHOPIFY_LIST_LOCATION
Key parameters:
- : Inventory item IDs to check
inventory_item_ids - : Location IDs to filter by
location_ids
Pitfalls:
- Inventory is tracked per variant per location
- Location IDs are required for multi-location stores
适用场景:用户需要查看或管理库存水平
工具执行顺序:
- /
SHOPIFY_GET_INVENTORY_LEVELS- 检查库存(必填)SHOPIFY_RETRIEVES_A_LIST_OF_INVENTORY_LEVELS - - 列出店铺位置(可选)
SHOPIFY_LIST_LOCATION
关键参数:
- :要检查的库存项目ID
inventory_item_ids - :用于筛选的位置ID
location_ids
注意事项:
- 库存按每个变体、每个位置进行跟踪
- 多位置店铺需要指定位置ID
Common Patterns
通用模式
Pagination
分页
- Use and
limitcursor for paginated resultspage_info - Check response for link header
next - 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
快速参考
| Task | Tool Slug | Key Params |
|---|---|---|
| List products | SHOPIFY_GET_PRODUCTS | (filters) |
| Get product | SHOPIFY_GET_PRODUCT | product_id |
| Products paginated | SHOPIFY_GET_PRODUCTS_PAGINATED | limit, page_info |
| Bulk create | SHOPIFY_BULK_CREATE_PRODUCTS | products |
| Product count | SHOPIFY_GET_PRODUCTS_COUNT | (none) |
| List orders | SHOPIFY_GET_ORDERS_WITH_FILTERS | status, financial_status |
| Get order | SHOPIFY_GET_ORDER | order_id |
| List customers | SHOPIFY_GET_ALL_CUSTOMERS | limit |
| Shop details | SHOPIFY_GET_SHOP_DETAILS | (none) |
| Validate access | SHOPIFY_VALIDATE_ACCESS | (none) |
| Smart collections | SHOPIFY_GET_SMART_COLLECTIONS | (none) |
| Products in collection | SHOPIFY_GET_PRODUCTS_IN_COLLECTION | collection_id |
| Inventory levels | SHOPIFY_GET_INVENTORY_LEVELS | inventory_item_ids |
| Locations | SHOPIFY_LIST_LOCATION | (none) |
| Fulfillment | SHOPIFY_GET_FULFILLMENT | order_id, fulfillment_id |
| GraphQL | SHOPIFY_GRAPH_QL_QUERY | query |
| Bulk query | SHOPIFY_BULK_QUERY_OPERATION | query |
| 任务 | 工具标识 | 关键参数 |
|---|---|---|
| 列出产品 | SHOPIFY_GET_PRODUCTS | (筛选条件) |
| 获取单个产品 | SHOPIFY_GET_PRODUCT | product_id |
| 分页列出产品 | SHOPIFY_GET_PRODUCTS_PAGINATED | limit, page_info |
| 批量创建产品 | SHOPIFY_BULK_CREATE_PRODUCTS | products |
| 获取产品数量 | SHOPIFY_GET_PRODUCTS_COUNT | (无) |
| 列出订单 | SHOPIFY_GET_ORDERS_WITH_FILTERS | status, financial_status |
| 获取单个订单 | SHOPIFY_GET_ORDER | order_id |
| 列出客户 | SHOPIFY_GET_ALL_CUSTOMERS | limit |
| 获取店铺详情 | SHOPIFY_GET_SHOP_DETAILS | (无) |
| 验证访问权限 | SHOPIFY_VALIDATE_ACCESS | (无) |
| 获取智能合集 | SHOPIFY_GET_SMART_COLLECTIONS | (无) |
| 获取合集中的产品 | SHOPIFY_GET_PRODUCTS_IN_COLLECTION | collection_id |
| 获取库存水平 | SHOPIFY_GET_INVENTORY_LEVELS | inventory_item_ids |
| 列出店铺位置 | SHOPIFY_LIST_LOCATION | (无) |
| 获取履约详情 | SHOPIFY_GET_FULFILLMENT | order_id, fulfillment_id |
| GraphQL查询 | SHOPIFY_GRAPH_QL_QUERY | query |
| 批量查询操作 | SHOPIFY_BULK_QUERY_OPERATION | query |