addtocartfrombitable从飞书Bitable表格获取商品信息(链接、规格、数量),然后通过浏览器自动化将其加入天猫/淘宝购物车。触发词:加购物车、Bitable商品、批量加购、采购表格。
Install via ClawdBot CLI:
clawdbot install Lorpha/addtocartfrombitable从飞书多维表格读取商品信息,自动添加到淘宝/天猫购物车。
默认表格:https://somo-tech.feishu.cn/base/UIdIbPe2RaOQ1tsNIhlcB5ilngc
UIdIbPe2RaOQ1tsNIhlcB5ilngctblwMnggn0CuboHs必需字段:
| 字段名 | 类型 | 说明 |
|--------|------|------|
| 链接 | URL | 商品链接(从 field.link 取值) |
| 采购规格 | Text | 要选择的规格文本,必须与页面上的规格选项完全匹配 |
| 数量 | Number | 购买数量 |
feishu_bitable_list_records(app_token, table_id, page_size=20)
筛选出有完整 链接、采购规格、数量 的记录。
对每条记录执行:
productUrl = record.fields.链接.linkproductSpec = record.fields.采购规格productQuantity = record.fields.数量browser.open(profile='openclaw', targetUrl=productUrl)
等待页面加载完成(约 3-5 秒)。
由于页面元素可能动态加载,直接使用 snapshot 可能无法找到。建议优先使用 evaluate 查找包含规格文本的元素并点击。
browser.act(profile='openclaw', request={
kind: 'evaluate',
fn: `(specText) => {
// XPath 查找包含文本的元素
const xpath = "//*[contains(text(), '" + specText + "')]";
const result = document.evaluate(xpath, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
for (let i = 0; i < result.snapshotLength; i++) {
const node = result.snapshotItem(i);
// 尝试点击,如果失败则向上找 clickable 的父元素
let target = node;
while (target && target !== document.body) {
// 检查常见的可点击标签或属性
if (['A', 'BUTTON', 'LI'].includes(target.tagName) || target.getAttribute('role') === 'button' || target.className.includes('sku')) {
target.click();
return true;
}
target = target.parentElement;
}
// 实在不行点击节点本身
node.click();
return true;
}
return false;
}`,
args: [productSpec]
})
同理,使用 evaluate 找到输入框并修改值:
browser.act(profile='openclaw', request={
kind: 'evaluate',
fn: `(qty) => {
const inputs = document.querySelectorAll('input.text-amount, input.mui-amount-input, input[type=number]');
for (let input of inputs) {
// 简单的启发式规则:value 是 1 或不为空
if (input.value) {
input.value = qty;
input.dispatchEvent(new Event('input', { bubbles: true }));
input.dispatchEvent(new Event('change', { bubbles: true }));
return true;
}
}
return false;
}`,
args: [productQuantity]
})
找到"加入购物车"按钮并点击:
browser.act(profile='openclaw', request={
kind: 'evaluate',
fn: `() => {
const buttons = document.querySelectorAll('a, button, div[role=button]');
for (let btn of buttons) {
const text = btn.innerText || btn.textContent;
if (text && (text.includes('加入购物车') || text.includes('加入购物袋'))) {
btn.click();
return true;
}
}
return false;
}`
})
等待 2-3 秒,检查是否出现成功提示或购物车数量变化。
完成后通过 message 工具发送 Telegram 通知:
message(action='send', channel='telegram', to='telegram:1642489086', message='采购商品已加入购物车:\n- 商品1: ✅\n- 商品2: ✅\n...')
改进点:
browser.snapshot 返回的静态文本 ref,而是利用 evaluate 在浏览器上下文中直接执行 DOM 操作,提高对动态页面和复杂结构的适应性。用户说:"帮我把采购表格里的商品加入购物车"
Generated Feb 27, 2026
Retail businesses use this skill to automate adding products from procurement lists in Feishu Bitable to Taobao/Tmall shopping carts, streamlining bulk purchasing for inventory restocking or promotional campaigns. It reduces manual data entry and errors, saving time for procurement teams.
Manufacturing companies automate sourcing of raw materials or components by reading supplier lists from Bitable and adding items to shopping carts for bulk orders. This ensures accurate specification matching and quantity control, improving supply chain efficiency.
Dropshipping businesses use this skill to automatically process customer orders by fetching product details from Bitable and adding them to supplier platforms like Taobao. It enables rapid order fulfillment and reduces manual copy-pasting tasks.
Companies automate purchasing gifts or event supplies by reading item lists from Bitable and adding them to shopping carts in bulk. This simplifies procurement for HR or administrative teams, ensuring timely acquisitions for corporate needs.
Analysts use this skill to automate adding competitor products from Bitable lists to shopping carts for price tracking or product comparison. It facilitates data collection for market studies without manual browsing.
Offer this skill as part of a subscription-based automation platform for businesses, charging monthly fees per user or transaction volume. It targets SMEs needing e-commerce integration with tools like Feishu.
Provide basic functionality for free with limits on records processed, then charge for advanced features like priority support, custom integrations, or higher automation speeds. This attracts small users and upsells to larger enterprises.
Sell customized versions of this skill tailored to specific industries or workflows, such as integrating with other platforms or adding analytics. Revenue comes from one-time development fees and ongoing maintenance contracts.
💬 Integration Tip
Ensure Feishu Bitable has proper API access and test the evaluate scripts on various Taobao/Tmall page layouts to handle dynamic content reliably.
Automate Xiaohongshu (RedNote) content operations using a Python client for the xiaohongshu-mcp server. Use for: (1) Publishing image, text, and video content, (2) Searching for notes and trends, (3) Analyzing post details and comments, (4) Managing user profiles and content feeds. Triggers: xiaohongshu automation, rednote content, publish to xiaohongshu, xiaohongshu search, social media management.
Feishu-integrated wrapper for the capability-evolver. Manages the evolution loop lifecycle (start/stop/ensure), sends rich Feishu card reports, and provides...
The Baidu Baike Component is a knowledge service tool designed to query authoritative encyclopedia explanations for various nouns. Its core function is given a specific "noun" (object, person, location, concept, event, etc.) provided by the user, it returns a standardized, detailed entry explanation sourced from Baidu Baike.
Draft and publish posts to 小红书 (Xiaohongshu/RED). Use when creating content for 小红书, drafting posts, generating cover images, or publishing via browser automation. Covers the full workflow from content creation to browser-based publishing, including cover image generation with Pillow.
AI-assisted creation, rendering, and automated publishing of Xiaohongshu-style content with support for Markdown to image cards and data tracking.
小红书全能助手 — 文案生成、封面制作、内容发布与管理。当用户要求写小红书笔记、生成小红书文案/标题/封面、发小红书、搜索小红书、评论点赞收藏等任何小红书相关操作时使用。支持一站式从文案创作到自动发布的完整流程。封面AI生图需配置可选环境变量(GEMINI_API_KEY 或 IMG_API_KEY 或 HUNY...