Feishu Toolkit
Complete Feishu (Lark) integration toolkit for AI agents. Read/write documents, fetch chat history, send files & screenshots, manage permissions, and create...
Complete Feishu (Lark) integration toolkit for AI agents. Read/write documents, fetch chat history, send files & screenshots, manage permissions, and create...
Real data. Real impact.
Emerging
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
A comprehensive Feishu (Lark) integration skill for AI agents. Covers 6 major capabilities:
im:message:send_as_bot — Send messagesim:resource — Upload files/imagesdocx:document — Read/write documentsdrive:permission — Manage permissions (optional)FEISHU_APP_ID and FEISHU_APP_SECRET environment variablesAll API calls use Feishu's tenant access token:
import requestsdef get_tenant_token(app_id, app_secret): r = requests.post( 'https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal', json={'app_id': app_id, 'app_secret': app_secret} ) return r.json()['tenant_access_token']
# Fetch document content as Markdown # Supports: doc, docx, sheet, bitable, wiki GET /open-apis/docx/v1/documents/{document_id}/raw_content
POST /open-apis/docx/v1/documents Body: {"title": "My Document"}
# Overwrite entire document content with Markdown POST /open-apis/docx/v1/documents/{document_id}/blocks/batch_update
For documents exceeding LLM output limits:
doc_tokenWiki URLs need to be resolved to actual document tokens first:
POST /open-apis/wiki/v2/spaces/get_node Body: {"token": "wiki_token"} # Returns the actual doc_token and doc_type
Fetch and summarize messages from a Feishu group chat.
# GET /open-apis/im/v1/messages params = { 'container_id_type': 'chat', 'container_id': chat_id, 'page_size': 50 }
| Type | Handling |
|---|---|
| Extract JSON → field |
| Extract text nodes from array |
| Note as |
| Filter out unless relevant |
If
has_more=true, fetch more pages using page_token. Default: 50 messages per page.
Send files to Feishu chats via REST API.
# POST /open-apis/im/v1/files headers = {'Authorization': f'Bearer {token}'} data = {'file_type': 'stream', 'file_name': 'filename.ext'} files = {'file': ('filename.ext', open(path, 'rb'), 'application/octet-stream')}
Supported
file_type: opus, mp4, pdf, doc, xls, ppt, stream (generic)
# POST /open-apis/im/v1/messages json = { 'receive_id': chat_id, 'msg_type': 'file', 'content': json.dumps({'file_key': file_key}) }
Capture macOS screenshots and send to Feishu.
# 1. Capture screenshot SCREENSHOT_PATH="$TMPDIR/screenshot_$(date +%s).png" screencapture -x "$SCREENSHOT_PATH"2. Upload image
POST /open-apis/im/v1/images
data: image_type=message, file=screenshot
3. Send image message
POST /open-apis/im/v1/messages
msg_type: image, content: {"image_key": "..."}
Note: Use
not$TMPDIRon macOS./tmp
Manage document/file permissions.
| Action | Description |
|---|---|
| List all collaborators |
| Add collaborator with permission level |
| Remove a collaborator |
doc, docx, sheet, bitable, folder, file, wiki, mindnote
email, openid, userid, unionid, openchat, opendepartmentid
| Level | Description |
|---|---|
| View only |
| Can edit |
| Full access (can manage permissions) |
# POST /open-apis/drive/v1/permissions/{token}/members params = {'type': 'docx'} json = { 'member_type': 'email', 'member_id': 'user@company.com', 'perm': 'edit' }
Note: Permission management is sensitive. Use with caution.
Create recurring scheduled reminders to Feishu chats.
Always confirm with the user:
cron add \ --name "<task_name>" \ --every "<interval>" \ --session main \ --system-event "[CRON] <task_name>. Send message to Feishu: '<reminder_content>'"
| Interval | Description |
|---|---|
| Every minute |
| Every 5 minutes |
| Every 30 minutes |
| Every hour |
| Cron expression (with ) |
cron list # List all tasks cron edit <id> # Edit task cron rm <id> # Delete (ask user first!) cron runs --id <id> # View execution history cron run <id> # Manual trigger
| API | Method | Path |
|---|---|---|
| Tenant Token | POST | |
| Read Document | GET | |
| Create Document | POST | |
| Send Message | POST | |
| Upload File | POST | |
| Upload Image | POST | |
| List Messages | GET | |
| Manage Permissions | POST | |
| Resolve Wiki | POST | |
Base URL:
https://open.feishu.cn/open-apis
tenant_access_token in the Authorization headermultipart/form-dataapplication/jsonNo automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.