feishu-tasks
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFeishu Tasks
飞书任务
Manage Feishu tasks with automatic user authorization. This skill handles OAuth token refresh and creates tasks that your user owns and can edit directly.
通过自动用户授权管理飞书任务。该技能可处理OAuth令牌刷新,并创建由用户拥有且可直接编辑的任务。
Quick Start
快速开始
Create a task for your user
为用户创建任务
bash
bash scripts/create_task.sh "Task Name" "Task Description"Returns task ID, GUID, and link.
bash
bash scripts/create_task.sh "Task Name" "Task Description"返回任务ID、GUID和链接。
List tasks
列出任务
bash
bash scripts/list_tasks.shbash
bash scripts/list_tasks.shGet task details
获取任务详情
bash
bash scripts/get_task.sh <task_guid>bash
bash scripts/get_task.sh <task_guid>Update a task
更新任务
bash
bash scripts/update_task.sh <task_guid> "New Summary" "New Description"bash
bash scripts/update_task.sh <task_guid> "New Summary" "New Description"Complete a task
完成任务
bash
bash scripts/complete_task.sh <task_guid>bash
bash scripts/complete_task.sh <task_guid>Workflow Example
工作流示例
bash
undefinedbash
undefined1. Create a task
1. 创建任务
TASK_ID=$(bash scripts/create_task.sh "Learn 10 IELTS phrases" "Master common phrases")
TASK_ID=$(bash scripts/create_task.sh "Learn 10 IELTS phrases" "Master common phrases")
2. List all tasks to verify
2. 列出所有任务进行验证
bash scripts/list_tasks.sh
bash scripts/list_tasks.sh
3. Complete the task when done
3. 完成任务后执行
bash scripts/complete_task.sh "<task_guid>"
undefinedbash scripts/complete_task.sh "<task_guid>"
undefinedSetup
配置步骤
Prerequisites
前置条件
- User must authorize with Feishu OAuth (one-time setup)
- Credentials stored at
~/.feishu-credentials.json - Required permissions:
offline_access task:task:read task:task:write
- 用户需通过飞书OAuth完成授权(一次性配置)
- 凭据存储在
~/.feishu-credentials.json - 所需权限:
offline_access task:task:read task:task:write
Verify Setup
验证配置
bash
bash scripts/verify_setup.shbash
bash scripts/verify_setup.shImportant Notes
重要说明
Token Management
令牌管理
- Automatic refresh: is automatically refreshed when
refresh_tokenexpiresuser_access_token - Long-term access: permission enables indefinite token refresh
offline_access - User identity: All operations use your user token, not app token → tasks you create are yours to edit
- 自动刷新:当过期时,
user_access_token会自动刷新refresh_token - 长期访问:权限支持无限期令牌刷新
offline_access - 用户身份:所有操作使用用户令牌而非应用令牌 → 创建的任务可由您自行编辑
Task Ownership
任务所有权
- Tasks created with this skill are owned by your user account
- You have full editing permissions in Feishu UI
- No permission issues like app-created tasks
- 使用该技能创建的任务归您的用户账户所有
- 您在飞书UI中拥有完整的编辑权限
- 不会出现应用创建任务时的权限问题
Credential Storage
凭据存储
Credentials are stored in :
~/.feishu-credentials.jsonjson
{
"app_id": "cli_...",
"app_secret": "...",
"user_access_token": "eyJ...",
"refresh_token": "eyJ...",
"scope": "offline_access task:task:read ..."
}This file contains sensitive tokens. Keep it secure.
凭据存储在中:
~/.feishu-credentials.jsonjson
{
"app_id": "cli_...",
"app_secret": "...",
"user_access_token": "eyJ...",
"refresh_token": "eyJ...",
"scope": "offline_access task:task:read ..."
}该文件包含敏感令牌,请妥善保管。
Troubleshooting
故障排除
"Unauthorized" Error
"未授权"错误
Usually means has expired and refresh failed:
user_access_tokenrefresh_tokenbash
bash scripts/verify_setup.shIf tokens are invalid, you'll need to re-authorize through OAuth flow.
通常意味着已过期且刷新失败:
user_access_tokenrefresh_tokenbash
bash scripts/verify_setup.sh如果令牌无效,您需要通过OAuth流程重新授权。
"Task not found"
"任务未找到"
Verify the task GUID is correct. List tasks to check:
bash
bash scripts/list_tasks.sh请验证任务GUID是否正确。可列出任务进行检查:
bash
bash scripts/list_tasks.shToken Refresh Issues
令牌刷新问题
The skill attempts automatic refresh. If it fails:
- Check network connectivity
- Verify credentials file exists and is valid
- Run for diagnostics
verify_setup.sh
该技能会尝试自动刷新令牌。如果刷新失败:
- 检查网络连接
- 确认凭据文件存在且有效
- 运行进行诊断
verify_setup.sh
Scripts Reference
脚本参考
See references/scripts.md for complete script documentation and API endpoints.
完整的脚本文档和API端点请查看references/scripts.md。
API Reference
API参考
See references/api.md for Feishu Task API details and response formats.
飞书任务API的详细信息和响应格式请查看references/api.md。
Tips
小贴士
- Batch operations: Create multiple tasks in a loop using
create_task.sh - Task templates: Store common task descriptions as environment variables for quick creation
- Integration: These scripts can be called from cron jobs or other automation
- 批量操作:使用在循环中创建多个任务
create_task.sh - 任务模板:将常用任务描述存储为环境变量,以便快速创建
- 集成:这些脚本可从cron作业或其他自动化流程中调用