Automates creating new documents in the Feishu workspace. This skill should be used when the user asks to "create a Feishu doc", "create a new doc in Feishu", "open Feishu and create document", "create document in leiniao-ibg", or mentions creating documents in Feishu or Lark workspace.
Automate the process of creating new documents in Feishu (Lark) workspace by using browser automation to navigate the UI, authenticate, and create documents with specified titles and content.
agent-browserLoad the office:agent-browser skill using the Skill tool to access browser automation commands.
Open the Feishu Drive homepage:
agent-browser open https://leiniao-ibg.feishu.cn/drive/home/
Wait for page to load:
agent-browser wait --load networkidle
Take a snapshot to check if already logged in:
agent-browser snapshot -i
If login is required, wait for user to complete authentication manually or handle authentication flow based on the page state.
Click the "新建" (New) button (use snapshot to locate the element ref):
agent-browser snapshot -i
# Locate "新建" button ref (e.g., @e1)
agent-browser click @e1
Wait for dropdown menu to appear:
agent-browser wait 1000
Take another snapshot to locate the "文档" (Doc) option:
agent-browser snapshot -i
# Locate "文档" button ref (e.g., @e2)
agent-browser click @e2
Click the "新建空白文档" (New Doc) option from the submenu:
agent-browser wait 1000
agent-browser snapshot -i
# Locate "新建空白文档" button ref (e.g., @e3)
agent-browser click @e3
Wait for the new document to open in a new tab:
agent-browser wait --load networkidle
Check tabs to ensure new document page opened:
agent-browser tab
If multiple tabs exist, switch to the newest tab (usually the last one):
agent-browser tab 2 # Adjust index based on tab list
The page should automatically focus on the title input field. If the title field is focused by default, type the title directly:
agent-browser type @e1 "Document Title Here"
If not automatically focused, take a snapshot to locate the title input:
agent-browser snapshot -i
# Locate title input ref (e.g., @e1)
agent-browser fill @e1 "Document Title Here"
Press Tab or click to move to the content area:
agent-browser press Tab
Or locate and click the content editor:
agent-browser snapshot -i
# Locate content editor ref (e.g., @e2)
agent-browser click @e2
Type the document content:
agent-browser type @e2 "Document content goes here..."
For multi-line content, use newlines in the input:
agent-browser type @e2 "First paragraph
Second paragraph
Third paragraph"
Take a final screenshot to verify the document was created successfully:
agent-browser screenshot
Feishu documents auto-save, so no explicit save action is required. The document is now ready to use.
Close the browser session when done:
agent-browser close
If authentication fails or login is required:
If snapshot cannot locate expected UI elements (button refs):
-i flag for debuggingagent-browser find text "新建" click # Find "新建" (New) button
agent-browser find text "文档" click # Find "文档" (Doc) button
agent-browser find text "新建空白文档" click # Find "新建空白文档" (New Doc) button
If page loading takes too long:
agent-browser wait --load networkidle --timeout 10000To use with a different Feishu workspace, replace the URL in Step 2:
agent-browser open https://your-workspace.feishu.cn/drive/home/
To use a specific document template instead of blank document:
agent-browser wait 1000) after clicking dropdown menusFor detailed browser automation commands and patterns:
office:agent-browser skill for complete command reference# Complete workflow example
agent-browser open https://leiniao-ibg.feishu.cn/drive/home/
agent-browser wait --load networkidle
agent-browser snapshot -i
agent-browser click @e1 # 新建 button
agent-browser wait 1000
agent-browser snapshot -i
agent-browser click @e2 # 文档 button
agent-browser wait 1000
agent-browser snapshot -i
agent-browser click @e3 # 新建空白文档 button
agent-browser wait --load networkidle
agent-browser tab
agent-browser tab 2 # Switch to new tab
agent-browser type @e1 "My Document Title"
agent-browser press Tab
agent-browser type @e2 "My document content..."
agent-browser screenshot