Lark Workflow Bitable Sync logo

Lark Workflow Bitable Sync

Community
liangdabiao
lark-workflow-bitable-sync

跨表数据同步器:从源多维表格读取数据,与目标表进行比对去重,将差异数据写入目标表。支持字段映射、增量同步、变更报告。当用户需要'数据同步'、'跨表同步'、'合并表格'、'数据迁移'、'表间数据同步'、'把A表的数据同步到B表'时使用。

Overview

Publisherliangdabiao
Repositorylark-workflow-feishu-cli
Skill namelark-workflow-bitable-sync
Stars
68
Forks
10
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by liangdabiao on GitHub. Read the source before you install it.

Installation

Install the Lark Workflow Bitable Sync AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/liangdabiao/lark-workflow-feishu-cli/tree/main/.claude/skills/lark-workflow-bitable-sync
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/liangdabiao/lark-workflow-feishu-cli.git /tmp/lark-workflow-feishu-cli
mkdir -p .claude/skills
cp -r /tmp/lark-workflow-feishu-cli/.claude/skills/lark-workflow-bitable-sync .claude/skills/lark-workflow-bitable-sync
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Lark Workflow Bitable Sync in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Lark Workflow Bitable Sync on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Lark Workflow Bitable Sync is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

跨表数据同步器工作流

CRITICAL — 开始前 MUST 先用 Read 工具读取 ../lark-shared/SKILL.md,其中包含认证、权限处理

适用场景

  • "把表格A的新数据同步到表格B" / "数据同步"
  • "跨表同步:收集表 → 跟进表" / "跨表同步"
  • "合并这两个表格的数据" / "合并表格"
  • "把A表的数据迁移到B表" / "数据迁移"
  • "监控表格XXX,有新记录就通知我" / "表间数据同步"

前置条件

仅支持 user 身份。执行前确保已授权:

bash
lark-cli auth login --domain base

工作流

{源表 base_token + table_id} → {目标表 base_token + table_id}
  │
  ├── base +field-list (源表) ──────► 源表字段结构
  │
  ├── base +field-list (目标表) ────► 目标表字段结构
  │
  ├── AI 字段映射 ──────────────────► 源字段 ↔ 目标字段(用户确认)
  │
  ├── base +record-list (源表) ────► 拉取源数据(分页,max 200/页)
  │
  ├── base +record-list (目标表) ──► 拉取目标现有数据(用于去重)
  │
  ├── AI 数据比对去重 ──────────────► 差异记录集(新增 + 更新)
  │
  └── base +record-upsert (目标表) ─► 写入差异数据(串行,间隔 1s)

Step 1: 获取表结构

分别获取源表和目标表的字段列表:

bash
# 源表字段
lark-cli base +field-list \
  --base-token "<src_base_token>" \
  --table-id "<src_table_id>" \
  --as user

# 目标表字段
lark-cli base +field-list \
  --base-token "<tgt_base_token>" \
  --table-id "<tgt_table_id>" \
  --as user

注意:两个 +field-list 调用不能并发,必须串行。

Step 2: AI 生成字段映射

根据两张表的字段名和类型,AI 自动生成字段映射方案:

markdown
## 字段映射方案

| 源字段 | 源类型 | → | 目标字段 | 目标类型 |
|--------|--------|---|---------|---------|
| 客户名称 | text | → | 公司名称 | text |
| 联系电话 | text | → | 电话 | text |
| 状态 | select | → | 跟进状态 | select |
| 创建时间 | datetime | → | 录入日期 | datetime |

**去重字段**:客户名称(以此字段判断记录是否已存在)

请确认此映射方案。

重要:

  • 必须与用户确认字段映射方案后再执行同步
  • 让用户指定去重字段(用于判断记录是否已存在)
  • 只映射可写入字段(忽略公式、查找引用、系统字段)

Step 3: 拉取源数据

bash
# 拉取源表全部记录(分页,每页最多 200 条)
lark-cli base +record-list \
  --base-token "<src_base_token>" \
  --table-id "<src_table_id>" \
  --as user

# 如果数据量大,使用分页
lark-cli base +record-list \
  --base-token "<src_base_token>" \
  --table-id "<src_table_id>" \
  --limit 200 \
  --as user

注意:每页最多 200 条记录。如果返回数据中有分页信息,继续使用 offset 拉取下一页。

Step 4: 拉取目标数据(去重用)

bash
# 拉取目标表现有记录(获取去重字段值)
lark-cli base +record-list \
  --base-token "<tgt_base_token>" \
  --table-id "<tgt_table_id>" \
  --as user

Step 5: AI 比对去重

对比源数据和目标数据,基于去重字段判断:

  • 新增:源表中有但目标表中没有的记录
  • 更新:源表和目标表都有的记录,但字段值有差异

生成差异报告:

markdown
## 同步预览

| 类型 | 数量 |
|------|------|
| 新增记录 | N |
| 需更新记录 | N |
| 无变化记录 | N |
| **总计** | **N** |

### 新增记录预览(前 5 条)
| 客户名称 | 联系电话 | 状态 |
|---------|---------|------|

### 需更新记录预览(前 5 条)
| 客户名称 | 字段 | 旧值 | 新值 |
|---------|------|------|------|

确认执行同步?

Step 6: 写入差异数据

对每条差异记录调用 +record-upsert(串行,间隔 1 秒):

新增记录

bash
lark-cli base +record-upsert \
  --base-token "<tgt_base_token>" \
  --table-id "<tgt_table_id>" \
  --json '{"公司名称":"XX科技","电话":"13800138000","跟进状态":"新线索"}' \
  --as user
sleep 1

更新记录

先获取目标记录的 record_id,再更新:

bash
lark-cli base +record-upsert \
  --base-token "<tgt_base_token>" \
  --table-id "<tgt_table_id>" \
  --record-id "<existing_record_id>" \
  --json '{"跟进状态":"已联系"}' \
  --as user
sleep 1

注意:

  • 每次调用间隔至少 1 秒
  • 日期字段需要 Unix 毫秒时间戳(不是字符串)
  • 人员字段格式为 [{"id":"ou_xxx"}]
  • 单选字段传选项名称字符串

降级策略

场景降级方案
字段类型不匹配跳过不兼容字段,只同步兼容字段
目标表无匹配字段提示用户在目标表创建对应字段
数据量过大分批同步(每批 50 条)
写入频率限制降低到每 2 秒一条
字段映射不明确询问用户确认映射关系

权限表

命令所需 scope
base +field-listbitable:app:readonly
base +record-listbitable:app:readonly
base +record-upsertbitable:app

参考

Frequently asked questions

What does the Lark Workflow Bitable Sync AI skill do?

跨表数据同步器:从源多维表格读取数据,与目标表进行比对去重,将差异数据写入目标表。支持字段映射、增量同步、变更报告。当用户需要'数据同步'、'跨表同步'、'合并表格'、'数据迁移'、'表间数据同步'、'把A表的数据同步到B表'时使用。

Why use Lark Workflow Bitable Sync on TypingMind?

Because you install it once and use it with any model. Lark Workflow Bitable Sync is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Lark Workflow Bitable Sync in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/liangdabiao/lark-workflow-feishu-cli/tree/main/.claude/skills/lark-workflow-bitable-sync. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Lark Workflow Bitable Sync?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Lark Workflow Bitable Sync?

As many as you like. As long as a model supports skills, you can use Lark Workflow Bitable Sync with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Lark Workflow Bitable Sync AI skill free?

It is published on GitHub by liangdabiao. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇