To read Feishu/Lark docx or wiki pages, you must first locate the fetch_feishu.py script within your Waza installation.
Setup
- Install dependencies:
pip install requests. - Set environment variables with your app credentials:
FEISHU_APP_IDFEISHU_APP_SECRET
- Ensure your app has
docx:document:readonly and wiki:wiki:readonly permissions.
Usage
Run the script directly with the URL:
python3 "$READ_SCRIPT_DIR/fetch_feishu.py" "{url}"
Output includes YAML frontmatter (title, document_id, url) and the Markdown body.
OAuth Fallback (lark-cli)
If API credentials are missing, you can use lark-cli for OAuth login:
npm install -g @larksuite/clilark-cli auth loginlark-cli docs +fetch --doc "{url}" --format json
Note: lark-cli returns structured JSON. You must extract and convert the content to Markdown before use.
# Setup environment
export FEISHU_APP_ID=your_app_id
export FEISHU_APP_SECRET=your_app_secret
# Execute fetch
python3 "$READ_SCRIPT_DIR/fetch_feishu.py" "{url}"
# OAuth Fallback
npm install -g @larksuite/cli
lark-cli auth login
lark-cli docs +fetch --doc "{url}" --format json