feishu-task

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Feishu Task Tools

Feishu Task 工具集

Tools:
  • feishu_task_create
  • feishu_task_subtask_create
  • feishu_task_get
  • feishu_task_update
  • feishu_task_delete
  • feishu_task_comment_create
  • feishu_task_comment_list
  • feishu_task_comment_get
  • feishu_task_comment_update
  • feishu_task_comment_delete
  • feishu_task_attachment_upload
  • feishu_task_attachment_list
  • feishu_task_attachment_get
  • feishu_task_attachment_delete
  • feishu_task_add_tasklist
  • feishu_task_remove_tasklist
  • feishu_tasklist_create
  • feishu_tasklist_get
  • feishu_tasklist_list
  • feishu_tasklist_update
  • feishu_tasklist_delete
  • feishu_tasklist_add_members
  • feishu_tasklist_remove_members
工具列表:
  • feishu_task_create
  • feishu_task_subtask_create
  • feishu_task_get
  • feishu_task_update
  • feishu_task_delete
  • feishu_task_comment_create
  • feishu_task_comment_list
  • feishu_task_comment_get
  • feishu_task_comment_update
  • feishu_task_comment_delete
  • feishu_task_attachment_upload
  • feishu_task_attachment_list
  • feishu_task_attachment_get
  • feishu_task_attachment_delete
  • feishu_task_add_tasklist
  • feishu_task_remove_tasklist
  • feishu_tasklist_create
  • feishu_tasklist_get
  • feishu_tasklist_list
  • feishu_tasklist_update
  • feishu_tasklist_delete
  • feishu_tasklist_add_members
  • feishu_tasklist_remove_members

Notes

注意事项

  • task_guid
    can be taken from a task URL (guid query param) or from
    feishu_task_get
    output.
  • comment_id
    can be obtained from
    feishu_task_comment_list
    output.
  • attachment_guid
    can be obtained from
    feishu_task_attachment_list
    output.
  • user_id_type
    controls returned/accepted user identity type (
    open_id
    ,
    user_id
    ,
    union_id
    ).
  • If no assignee is specified, set the assignee to the requesting user. Avoid creating unassigned tasks because the user may not be able to view them.
  • Task visibility: users can only view tasks when they are included as assignee.
  • Current limitation: the bot can only create subtasks for tasks created by itself.
  • Attachment upload supports local
    file_path
    and remote
    file_url
    . Remote URLs are fetched with runtime media safety checks and size limit (
    mediaMaxMb
    ).
  • Keep tasklist owner as the bot. Add users as members to avoid losing bot access.
  • Use tasklist tools for tasklist membership changes; do not use
    feishu_task_update
    to move tasks between tasklists.
  • task_guid
    可从任务URL(guid查询参数)或
    feishu_task_get
    的输出中获取。
  • comment_id
    可从
    feishu_task_comment_list
    的输出中获取。
  • attachment_guid
    可从
    feishu_task_attachment_list
    的输出中获取。
  • user_id_type
    控制返回/接受的用户身份类型(
    open_id
    user_id
    union_id
    )。
  • 如果未指定经办人,默认将经办人设置为发起请求的用户。避免创建无经办人的任务,因为用户可能无法查看此类任务。
  • 任务可见性:用户只有作为经办人时才能查看任务。
  • 当前限制:机器人仅能为自身创建的任务添加子任务。
  • 附件上传支持本地
    file_path
    和远程
    file_url
    。远程URL会在运行时进行媒体安全检查,且有大小限制(
    mediaMaxMb
    )。
  • 保持任务列表的所有者为机器人。将用户添加为成员,避免机器人失去访问权限。
  • 修改任务列表成员请使用任务列表工具;不要通过
    feishu_task_update
    在任务列表间移动任务。

Create Task

创建任务

json
{
  "summary": "Quarterly review",
  "description": "Prepare review notes",
  "due": { "timestamp": "1735689600000", "is_all_day": true },
  "members": [
    { "id": "ou_xxx", "role": "assignee", "type": "user" }
  ],
  "user_id_type": "open_id"
}
json
{
  "summary": "Quarterly review",
  "description": "Prepare review notes",
  "due": { "timestamp": "1735689600000", "is_all_day": true },
  "members": [
    { "id": "ou_xxx", "role": "assignee", "type": "user" }
  ],
  "user_id_type": "open_id"
}

Create Subtask

创建子任务

json
{
  "task_guid": "e297ddff-06ca-4166-b917-4ce57cd3a7a0",
  "summary": "Draft report outline",
  "description": "Collect key metrics",
  "due": { "timestamp": "1735689600000", "is_all_day": true },
  "members": [
    { "id": "ou_xxx", "role": "assignee", "type": "user" }
  ],
  "user_id_type": "open_id"
}
json
{
  "task_guid": "e297ddff-06ca-4166-b917-4ce57cd3a7a0",
  "summary": "Draft report outline",
  "description": "Collect key metrics",
  "due": { "timestamp": "1735689600000", "is_all_day": true },
  "members": [
    { "id": "ou_xxx", "role": "assignee", "type": "user" }
  ],
  "user_id_type": "open_id"
}

Create Comment

创建评论

json
{
  "task_guid": "e297ddff-06ca-4166-b917-4ce57cd3a7a0",
  "content": "Looks good to me",
  "user_id_type": "open_id"
}
json
{
  "task_guid": "e297ddff-06ca-4166-b917-4ce57cd3a7a0",
  "content": "Looks good to me",
  "user_id_type": "open_id"
}

Upload Attachment (file_path)

上传附件(file_path)

json
{
  "task_guid": "e297ddff-06ca-4166-b917-4ce57cd3a7a0",
  "file_path": "/path/to/report.pdf",
  "user_id_type": "open_id"
}
json
{
  "task_guid": "e297ddff-06ca-4166-b917-4ce57cd3a7a0",
  "file_path": "/path/to/report.pdf",
  "user_id_type": "open_id"
}

Upload Attachment (file_url)

上传附件(file_url)

json
{
  "task_guid": "e297ddff-06ca-4166-b917-4ce57cd3a7a0",
  "file_url": "https://oss-example.com/bucket/report.pdf",
  "filename": "report.pdf",
  "user_id_type": "open_id"
}
json
{
  "task_guid": "e297ddff-06ca-4166-b917-4ce57cd3a7a0",
  "file_url": "https://oss-example.com/bucket/report.pdf",
  "filename": "report.pdf",
  "user_id_type": "open_id"
}

Tasklist Membership For Tasks

任务与任务列表关联

Add Task to Tasklist

将任务添加至任务列表

json
{
  "task_guid": "e297ddff-06ca-4166-b917-4ce57cd3a7a0",
  "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004",
  "section_guid": "6d0f9f48-2e06-4e3d-8a0f-acde196e8c61",
  "user_id_type": "open_id"
}
json
{
  "task_guid": "e297ddff-06ca-4166-b917-4ce57cd3a7a0",
  "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004",
  "section_guid": "6d0f9f48-2e06-4e3d-8a0f-acde196e8c61",
  "user_id_type": "open_id"
}

Remove Task from Tasklist

将任务从任务列表移除

json
{
  "task_guid": "e297ddff-06ca-4166-b917-4ce57cd3a7a0",
  "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004",
  "user_id_type": "open_id"
}
json
{
  "task_guid": "e297ddff-06ca-4166-b917-4ce57cd3a7a0",
  "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004",
  "user_id_type": "open_id"
}

Tasklists

任务列表

Tasklists support three roles: owner (read/edit/manage), editor (read/edit), viewer (read).
任务列表支持三种角色:所有者(可读/可编辑/可管理)、编辑者(可读/可编辑)、查看者(只读)。

Create Tasklist

创建任务列表

json
{
  "name": "Project Alpha Tasklist",
  "members": [
    { "id": "ou_xxx", "type": "user", "role": "editor" }
  ],
  "user_id_type": "open_id"
}
json
{
  "name": "Project Alpha Tasklist",
  "members": [
    { "id": "ou_xxx", "type": "user", "role": "editor" }
  ],
  "user_id_type": "open_id"
}

Get Tasklist

获取任务列表

json
{
  "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004",
  "user_id_type": "open_id"
}
json
{
  "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004",
  "user_id_type": "open_id"
}

List Tasklists

列出任务列表

json
{
  "page_size": 50,
  "page_token": "aWQ9NzEwMjMzMjMxMDE=",
  "user_id_type": "open_id"
}
json
{
  "page_size": 50,
  "page_token": "aWQ9NzEwMjMzMjMxMDE=",
  "user_id_type": "open_id"
}

Update Tasklist

更新任务列表

json
{
  "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004",
  "tasklist": {
    "name": "Renamed Tasklist",
    "owner": { "id": "ou_xxx", "type": "user", "role": "owner" }
  },
  "update_fields": ["name", "owner"],
  "origin_owner_to_role": "editor",
  "user_id_type": "open_id"
}
json
{
  "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004",
  "tasklist": {
    "name": "Renamed Tasklist",
    "owner": { "id": "ou_xxx", "type": "user", "role": "owner" }
  },
  "update_fields": ["name", "owner"],
  "origin_owner_to_role": "editor",
  "user_id_type": "open_id"
}

Delete Tasklist

删除任务列表

json
{
  "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004"
}
json
{
  "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004"
}

Add Tasklist Members

添加任务列表成员

json
{
  "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004",
  "members": [
    { "id": "ou_xxx", "type": "user", "role": "editor" }
  ],
  "user_id_type": "open_id"
}
json
{
  "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004",
  "members": [
    { "id": "ou_xxx", "type": "user", "role": "editor" }
  ],
  "user_id_type": "open_id"
}

Remove Tasklist Members

移除任务列表成员

json
{
  "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004",
  "members": [
    { "id": "ou_xxx", "type": "user", "role": "viewer" }
  ],
  "user_id_type": "open_id"
}
json
{
  "tasklist_guid": "cc371766-6584-cf50-a222-c22cd9055004",
  "members": [
    { "id": "ou_xxx", "type": "user", "role": "viewer" }
  ],
  "user_id_type": "open_id"
}