Loading...
Loading...
Feishu Drive: Manage files and folders in the cloud space. Upload and download files, create folders, copy/move/delete files, view file metadata, manage document comments, manage document permissions, and subscribe to user comment change events. Use this when you need to upload or download files, organize cloud space directories, view file details, manage comments, manage document permissions, or subscribe to user comment change events.
npx skill4agent add larksuite/cli lark-drive../lark-shared/SKILL.mdfile_token| URL Format | Example | Token Type | Handling Method |
|---|---|---|---|
| | | Use the token in the URL path directly as |
| | | Use the token in the URL path directly as |
| | | ⚠️ Cannot be used directly, you need to query to get the real |
| | | Use the token in the URL path directly as |
| | | Use the token in the URL path as the folder token |
/wiki/TOKENwiki.spaces.get_nodelark-cli wiki spaces get_node --params '{"token":"wiki_token"}'node.obj_typenode.obj_tokennode.titleobj_type| obj_type | Description | API to Use |
|---|---|---|
| New version cloud document | |
| Old version cloud document | |
| Spreadsheet | |
| Base table | |
| Slides | |
| File | |
| Mind map | |
# Query wiki node
lark-cli wiki spaces get_node --params '{"token":"wiki_token"}'{
"node": {
"obj_type": "docx",
"obj_token": "xxxx",
"title": "Title",
"node_type": "origin",
"space_id": "12345678910"
}
}Wiki Space
└── Wiki Node
├── obj_type: docx (New version document)
│ └── obj_token (Real document token)
├── obj_type: doc (Old version document)
│ └── obj_token (Real document token)
├── obj_type: sheet (Spreadsheet)
│ └── obj_token (Real document token)
├── obj_type: bitable (Base table)
│ └── obj_token (Real document token)
└── obj_type: file/slides/mindnote
└── obj_token (Real document token)
Drive Folder
└── File (File/Document)
└── file_token (Use directly)| Operation | Required Token | Description |
|---|---|---|
| Read document content | | |
| Add local comment (selected text comment) | | When passing |
| Add full-document comment | | When not passing |
| Download file | | Extract directly from the file URL |
| Upload file | | Token of the target location |
| List document comments | | Same as adding comments |
drive +add-comment--selection-with-ellipsis--block-id--full-commentdocxdocdocdocx--selection-with-ellipsis--block-iddocxdocx--contentdrive +add-commentreply_elements--content '[{"type":"text","text":"Content"}]'+add-commentdocdocxlark-cli schema drive.file.comments.create_v2lark-cli drive file.comments create_v2 ...anchoranchor.block_iddrive file.comments listitemsdrive file.comments listitemitem.reply_list.repliesitemsitemsitem.reply_list.repliesitemsitem.reply_list.repliesitem.has_more=truedrive file.comment.replys listcreate_timecreate_timecreate_timecreate_timedrive file.comments listis_whole=trueis_solved=truedrive file.comments batch_querydrive file.comments list| Error Message | Cause | Solution |
|---|---|---|
| Used an incorrect token | Check the token type; wiki links must first be queried to obtain |
| No relevant operation permissions | Guide the user to check if the current identity has the corresponding operation permissions for the document/file; if needed, grant the corresponding permissions |
| Incorrect file_type parameter | Pass the correct file_type according to |
lark-cli drive +<verb> [flags]| Shortcut | Description |
|---|---|
| Upload a local file to Drive |
| Download a file from Drive to local |
| Add a full-document comment, or a local comment to selected docx text (also supports wiki URL resolving to doc/docx) |
lark-cli schema drive.<resource>.<method> # Must check the parameter structure before calling the API
lark-cli drive <resource> <method> [flags] # Call the APIImportant: When using the native API, you must first runto check theschema/--dataparameter structure, do not guess the field format.--params
copybatch_querycreate_v2listpatchcreatedeletelistupdateauthcreatetransfer_ownerbatch_queryremove_subscriptionsubscriptionsubscription_status| Method | Required scope |
|---|---|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |