Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions skills/lark-base/references/lark-base-workflow-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# 内联 JSON(简单工作流)
lark-cli base +workflow-create \
--base-token BascXxxxxx \
--json '{"client_token":"1700000000","title":"新订单自动通知","steps":[{"id":"trigger_1","type":"AddRecordTrigger","title":"监控新订单","children":{"links":[]},"next":"action_1","data":{"table_name":"订单表","watched_field_name":"订单号"}},{"id":"action_1","type":"LarkMessageAction","title":"发送通知","children":{"links":[]},"next":null,"data":{"receiver":[{"value_type":"user","value":"ou_xxxx"}],"send_to_everyone":false,"title":[{"value_type":"text","value":"新订单提醒"}],"content":[{"value_type":"text","value":"收到新订单"}],"btn_list":[]}}]}'
--json '{"client_token":"1700000000","title":"新订单自动通知","steps":[{"id":"trigger_1","type":"AddRecordTrigger","title":"监控新订单","next":"action_1","data":{"table_name":"订单表","watched_field_name":"订单号"}},{"id":"action_1","type":"LarkMessageAction","title":"发送通知","next":null,"data":{"receiver":[{"value_type":"user","value":"ou_xxxx"}],"send_to_everyone":false,"title":[{"value_type":"text","value":"新订单提醒"}],"content":[{"value_type":"text","value":"收到新订单"}],"btn_list":[]}}]}'

# 从文件读取(推荐用于复杂工作流)
lark-cli base +workflow-create \
Expand Down Expand Up @@ -70,7 +70,6 @@ POST /open-apis/base/v3/bases/:base_token/workflows
"id": "trigger_1",
"type": "AddRecordTrigger",
"title": "监控新订单",
"children": { "links": [] },
"next": "action_1",
"data": {
"table_name": "订单表",
Expand All @@ -81,7 +80,6 @@ POST /open-apis/base/v3/bases/:base_token/workflows
"id": "action_1",
"type": "LarkMessageAction",
"title": "发送通知",
"children": { "links": [] },
"next": null,
"data": {
"receiver": [{ "value_type": "user", "value": "ou_xxxx" }],
Expand Down
2 changes: 0 additions & 2 deletions skills/lark-base/references/lark-base-workflow-get.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,13 @@ GET /open-apis/base/v3/bases/:base_token/workflows/:workflow_id
"id": "trigger_1",
"type": "AddRecordTrigger",
"title": "监控新订单",
"children": { "links": [] },
"next": "action_1",
"data": { "table_name": "订单表", "watched_field_name": "订单号" }
},
{
"id": "action_1",
"type": "LarkMessageAction",
"title": "发送通知",
"children": { "links": [] },
"next": null,
"data": { "..." : "..." }
}
Expand Down
35 changes: 14 additions & 21 deletions skills/lark-base/references/lark-base-workflow-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
"id": "step_xxx",
"type": "AddRecordTrigger",
"title": "监控新订单",
"children": {
"links": []
},
"next": "step_yyy",
"data": {}
}
Expand Down Expand Up @@ -88,7 +85,7 @@
| `ReminderTrigger` | 日期提醒触发 |
| `LarkMessageTrigger` | 接收飞书消息触发 |

> 所有 Trigger 节点的 `children.links` 为空 `[]`,通过 `next` 串联后继。
> 所有 Trigger 节点**请勿设置** `children` ,通过 `next` 串联后继。

### 触发器选型指南

Expand All @@ -112,7 +109,7 @@
| `LarkMessageAction` | 发送飞书消息 |
| `GenerateAiTextAction` | AI 生成文本 |

> 所有 Action 节点的 `children.links` 为空 `[]`,通过 `next` 串联后继。
> 所有 Action 节点**请勿设置** `children` ,通过 `next` 串联后继。

### Branch 类型

Expand Down Expand Up @@ -260,22 +257,22 @@
}
```

| 字段 | 必填 | 说明 |
|------|------|------|
| `receive_scene` | 是 | 接收场景:`group`(群聊)/ `chat`(单聊) |
| `receiver` | 是 | 触发来源,支持 `user` / `group` / `ref` |
| `scope` | 是 | 触发范围:`at`(@提及)/ `all`(所有消息) |
| `filter` | 是 | MessageFilter 消息过滤条件 |
| 字段 | 必填 | 说明|
|------|------|---|
| `receive_scene` | 是 | 接收场景:`group`(群聊)/ `chat`(单聊)|
| `receiver` | 是 | 触发来源,支持 `user` / `group` / `ref`。在单聊场景下,该字段指“可以和机器人单聊的用户”;在群聊场景下,该字段指“接收信息的群组”|
| `scope` | 是 | 触发范围:`at`(@提及)/ `all`(所有消息)。该参数仅在群聊场景有效,单聊场景请勿指定该参数|
| `filter` | 是 | MessageFilter 消息过滤条件|

`MessageFilter`:

| 字段 | 类型 | 说明 |
|------|------|------|
| `conjunction` | string | `and` 满足所有条件 / `or` 任一条件 |
| `content_contains` | string[] | 关键词列表 |
| `sender_contains` | ValueInfo[] | 筛选发送人(群聊+群组来源时生效|
| `is_new_message` | boolean | 仅新主题消息(群聊时有效) |
| `is_message_contain_attachment` | boolean | 是否仅附件消息触发 |
|------|------|----|
| `conjunction` | string | `and` 满足所有条件 / `or` 任一条件|
| `content_contains` | string[] | 关键词列表|
| `sender_contains` | ValueInfo[] | 筛选发送人(仅群聊+群组来源时生效,单聊场景请勿指定该参数)|
| `is_new_message` | boolean | 仅新话题消息(仅群聊时有效,单聊场景请勿指定该参数)|
| `is_message_contain_attachment` | boolean | 是否仅附件消息触发|

## Action data 详细结构

Expand Down Expand Up @@ -830,7 +827,6 @@ $.{stepId}.{fieldId}.fileToken → 文件 Token 列表(array<string>,仅
"id": "step_1",
"type": "AddRecordTrigger",
"title": "当「订单表」新增记录时触发",
"children": { "links": [] },
"next": "step_2",
"data": {
"table_name": "订单表",
Expand Down Expand Up @@ -866,7 +862,6 @@ $.{stepId}.{fieldId}.fileToken → 文件 Token 列表(array<string>,仅
"id": "step_3",
"type": "LarkMessageAction",
"title": "通知主管审批大额订单",
"children": { "links": [] },
"next": null,
"data": {
"receiver": [{ "value_type": "ref", "value": "$.step_1.fieldxxx" }],
Expand All @@ -884,7 +879,6 @@ $.{stepId}.{fieldId}.fileToken → 文件 Token 列表(array<string>,仅
"id": "step_4",
"type": "SetRecordAction",
"title": "自动标记小额订单为已通过",
"children": { "links": [] },
"next": null,
"data": {
"table_name": "订单表",
Expand All @@ -898,7 +892,6 @@ $.{stepId}.{fieldId}.fileToken → 文件 Token 列表(array<string>,仅
"id": "step_5",
"type": "GenerateAiTextAction",
"title": "AI 生成订单处理日报",
"children": { "links": [] },
"next": null,
"data": {
"prompt": [
Expand Down
2 changes: 0 additions & 2 deletions skills/lark-base/references/lark-base-workflow-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ PUT /open-apis/base/v3/bases/:base_token/workflows/:workflow_id
"id": "trigger_1",
"type": "AddRecordTrigger",
"title": "监控新订单",
"children": { "links": [] },
"next": "action_1",
"data": {
"table_name": "订单表",
Expand All @@ -89,7 +88,6 @@ PUT /open-apis/base/v3/bases/:base_token/workflows/:workflow_id
"id": "action_1",
"type": "LarkMessageAction",
"title": "发送通知",
"children": { "links": [] },
"next": null,
"data": {
"receiver": [{ "value_type": "user", "value": "ou_xxxx" }],
Expand Down
Loading