Feishu Chat Importer
by @arkerro
Convert Feishu chat history exports into OpenClaw episodic memory format. Parses feishu_chat_YYYYMMDD.json files, normalizes messages, and writes daily episo...
clawhub install feishu-chat-importerπ About This Skill
name: feishu-chat-importer description: "Convert Feishu chat history exports into OpenClaw episodic memory format. Parses feishu_chat_YYYYMMDD.json files, normalizes messages, and writes daily episodic summaries to memory/episodic/. Trigger phrases: import feishu chat, convert feishu history, feishu memory import." metadata: {"clawdbot":{"emoji":"π₯","requires":{"bins":["python3"]},"env":[],"os":["win32","linux","darwin"],"homepage":"https://clawhub.com"}}
Feishu Chat History Importer
Import Feishu chat history exports into OpenClaw episodic memory. Converts feishu JSON exports into daily episodic summaries that the Dreaming system can process and display in Imported Insights and Memory Palace views.
Quick Start
# Dry run β preview what would be imported
python3 skills/feishu-chat-importer/scripts/batch.py --dir memory/Chat-history --dry-runImport all Feishu chats
python3 skills/feishu-chat-importer/scripts/batch.py --dir memory/Chat-historyImport only chats since a date
python3 skills/feishu-chat-importer/scripts/batch.py --dir memory/Chat-history --since 2026-03-01Verbose β show every message
python3 skills/feishu-chat-importer/scripts/batch.py --dir memory/Chat-history --dry-run --verbose
How It Works
1. Read feishu_chat_YYYYMMDD.json files from the source directory
2. Group messages by date (from create_time / millisecond timestamp)
3. Normalize each message to {role, content, timestamp}
- sender.sender_type = "user" β role = user
- sender.sender_type = "app" β role = assistant (Feishu bot = AI)
4. Write daily episodic summaries to memory/episodic/YYYY-MM-DD.md
5. Dreaming processes episodic files β appears in Imported Insights + Memory Palace
Output Format
Writes to memory/episodic/YYYY-MM-DD.md:
## Feishu Chat: (2026-03-19)
Messages:
Participants: user_id, app_id user (ι¦ιΏ):
message content here...assistant (ι£δΉ¦ζΊε¨δΊΊ):
message content here...
Key Concepts
user, App/bot messages β assistanttext and post msg_type automaticallySource Format
Expects Feishu export files named feishu_chat_YYYYMMDD.json with this structure:
[
{
"message_id": "om_xxx",
"chat_id": "oc_xxx",
"create_time": "1773899372102",
"msg_type": "text|post",
"sender": {
"id": "ou_xxx",
"sender_type": "user|app"
},
"body": {
"content": "{\"text\":\"message text\"}" // text type
// or
"content": "{\"title\":\"\",\"content\":[[{\"tag\":\"text\",\"text\":\"...\"}]]}" // post type
}
}
]
π‘ Examples
# Dry run β preview what would be imported
python3 skills/feishu-chat-importer/scripts/batch.py --dir memory/Chat-history --dry-runImport all Feishu chats
python3 skills/feishu-chat-importer/scripts/batch.py --dir memory/Chat-historyImport only chats since a date
python3 skills/feishu-chat-importer/scripts/batch.py --dir memory/Chat-history --since 2026-03-01Verbose β show every message
python3 skills/feishu-chat-importer/scripts/batch.py --dir memory/Chat-history --dry-run --verbose